1
0

update pipelines

This commit is contained in:
2024-10-26 23:08:10 +02:00
parent 2d5bdfe40e
commit ba67b34a0d
3 changed files with 48 additions and 5 deletions

View File

@@ -1,4 +1,5 @@
name: Publish
run-name: Publish ${{ github.ref_name }}
on:
release:
@@ -13,21 +14,27 @@ jobs:
with:
node-version: latest
registry-url: https://registry.npmjs.org/
- name: Install dependencies
run: npm ci
- name: Run tests
run: npm test
- name: Build
run: npm run build
- name: Publish to npmjs
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
run: npm publish --tag latest --access public
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm publish --tag ${{ contains(github.ref_name, '-') && 'pre' || 'latest' }} --access public
- uses: actions/setup-node@v3
with:
node-version: latest
registry-url: https://npm.pkg.github.com/
- name: Publish to GPR
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
run: npm publish --tag latest --access public
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npm publish --tag ${{ contains(github.ref_name, '-') && 'pre' || 'latest' }} --access public