v0.8.1 #36
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release production | |
on: | |
release: | |
types: [created] | |
defaults: | |
run: | |
working-directory: ./ | |
jobs: | |
prebuild: | |
runs-on: ubuntu-22.04 | |
outputs: | |
version: ${{ steps.package-version.outputs.version }} | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: get npm version | |
id: package-version | |
uses: Saionaro/[email protected] | |
- name: Check version match | |
if: ${{ github.ref_name != format('v{0}', steps.package-version.outputs.version) }} | |
uses: actions/github-script@v3 | |
with: | |
script: | | |
core.setFailed('Version mismatch') | |
publish-libraries: | |
needs: [prebuild] | |
runs-on: ubuntu-22.04 | |
environment: production | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup Node version | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: '.nvmrc' | |
check-latest: false | |
cache: 'npm' | |
cache-dependency-path: package-lock.json | |
- uses: denoland/setup-deno@v2 | |
with: | |
deno-version: v2.x | |
- name: Cache cargo assets | |
id: cache | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: build-cargo-${{ hashFiles('**/Cargo.lock') }} | |
- name: Install dependencies | |
run: | | |
npm cache verify | |
npm ci --no-audit --prefer-offline | |
- name: Setup cargo version from npm | |
run: | | |
cargo install cargo-edit --force | |
cargo set-version ${{ needs.prebuild.outputs.version }} | |
- name: Run NX publish | |
run: npx nx run-many -t publish --verbose | |
env: | |
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} | |
EMBEDDING_API_URL: ${{ vars.EMBEDDING_API_URL }} |