Fix release installers and package manager fallbacks
This commit is contained in:
19
.github/workflows/publish.yml
vendored
19
.github/workflows/publish.yml
vendored
@@ -39,20 +39,29 @@ jobs:
|
||||
|
||||
publish-npm:
|
||||
needs: version-check
|
||||
if: needs.version-check.outputs.should_publish == 'true'
|
||||
if: needs.version-check.outputs.should_build_release == 'true'
|
||||
runs-on: blacksmith-4vcpu-ubuntu-2404
|
||||
permissions:
|
||||
contents: read
|
||||
steps:
|
||||
- name: Skip npm publish
|
||||
if: needs.version-check.outputs.should_publish != 'true'
|
||||
run: echo "Skipping npm publish; version ${{ needs.version-check.outputs.version }} is already on npm."
|
||||
- uses: actions/checkout@v6
|
||||
if: needs.version-check.outputs.should_publish == 'true'
|
||||
- uses: actions/setup-node@v5
|
||||
if: needs.version-check.outputs.should_publish == 'true'
|
||||
with:
|
||||
node-version: 24.14.0
|
||||
registry-url: https://registry.npmjs.org
|
||||
- run: npm ci --ignore-scripts
|
||||
- run: npm run build
|
||||
- run: npm test
|
||||
- if: needs.version-check.outputs.should_publish == 'true'
|
||||
run: npm ci --ignore-scripts
|
||||
- if: needs.version-check.outputs.should_publish == 'true'
|
||||
run: npm run build
|
||||
- if: needs.version-check.outputs.should_publish == 'true'
|
||||
run: npm test
|
||||
- run: npm publish --access public
|
||||
if: needs.version-check.outputs.should_publish == 'true'
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
|
||||
@@ -109,7 +118,7 @@ jobs:
|
||||
- version-check
|
||||
- publish-npm
|
||||
- build-native-bundles
|
||||
if: always() && needs.version-check.outputs.should_build_release == 'true' && needs.build-native-bundles.result == 'success' && (needs.publish-npm.result == 'success' || needs.publish-npm.result == 'skipped')
|
||||
if: needs.version-check.outputs.should_build_release == 'true' && needs.build-native-bundles.result == 'success' && needs.publish-npm.result == 'success'
|
||||
runs-on: blacksmith-4vcpu-ubuntu-2404
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
Reference in New Issue
Block a user