v0.10.0 #37
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: Build and publish | |
on: | |
release: | |
types: [published] | |
concurrency: | |
group: production | |
cancel-in-progress: false | |
jobs: | |
build_and_publish: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- uses: oven-sh/setup-bun@v2 | |
with: | |
bun-version: latest | |
- name: Install jq | |
run: sudo apt-get install jq | |
- name: Update package version | |
run: bash ${{ github.workspace }}/.github/workflows/update-package-json-version.sh ${{ github.event.release.tag_name }} | |
- name: Install dependencies | |
run: bun install --frozen-lockfile | |
- name: Build package | |
run: bun run build | |
- name: Setup nodejs | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20.x' | |
registry-url: 'https://registry.npmjs.org/' | |
scope: '@aninix-inc' | |
- name: Publish to npm registry | |
# @NOTE: required to publish only dist folder | |
run: npm publish ./dist --access public | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
# @NOTE: publishing to private registry required to internal usage of Aninix team. | |
# Otherwise we have conflicts with different registries when using mix of private/public packages. | |
- name: Setup nodejs | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20.x' | |
registry-url: 'https://npm.pkg.github.com' | |
scope: '@aninix-inc' | |
- name: Publish to GitHub Packages | |
# @NOTE: required to publish only dist folder | |
run: npm publish ./dist | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |