Skip to content

Commit

Permalink
ci: fix release (#129)
Browse files Browse the repository at this point in the history
Release-As: 9.0.1
  • Loading branch information
Hoishin authored Jan 3, 2025
1 parent 05d0cb2 commit 557e578
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 21 deletions.
19 changes: 0 additions & 19 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,22 +30,3 @@ jobs:
- uses: codecov/codecov-action@v3
if: matrix.node-version == '22'
- run: npm run build

canary-publish:
runs-on: ubuntu-latest
needs: test
if: github.event_name == 'push' && github.ref_name == 'main'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "22"
registry-url: "https://registry.npmjs.org"
cache: npm
- run: npm ci
- run: npm run build
- run: |
npm version 0.0.0-canary.${{ github.sha }} --no-git-tag-version
npm publish --tag canary
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
11 changes: 9 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ jobs:
publish:
runs-on: ubuntu-latest
needs: release-please
if: ${{ needs.release-please.outputs.release_created }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
Expand All @@ -35,7 +34,15 @@ jobs:
cache: npm
- run: npm ci
- run: npm run build
- name: Publish to npm

- if: ${{ needs.release-please.outputs.release_created }}
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- if: ${{ !needs.release-please.outputs.release_created }}
run: |
npm version 0.0.0-canary.${{ github.sha }} --no-git-tag-version
npm publish --tag canary
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit 557e578

Please sign in to comment.