Skip to content

v2.0.0-beta.4

v2.0.0-beta.4 #9

Workflow file for this run

name: Publish
on:
release:
types: [created]
jobs:
build-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
show-progress: false
- uses: actions/setup-node@v4
with:
node-version: 18
cache: 'npm'
- run: npm ci --ignore-scripts
- run: npm test
publish-npm:
needs: build-test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
show-progress: false
- uses: actions/setup-node@v4
with:
node-version: 18
registry-url: https://registry.npmjs.org/
cache: 'npm'
- run: npm ci --ignore-scripts
- run: npm run build
- run: echo "tag=latest" >> $GITHUB_ENV
- name: Sets npm tag
if: contains(github.event.release.tag_name, 'beta')
run: echo "tag=beta" >> $GITHUB_ENV
- run: npm publish --access public --tag ${{ env.tag }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
publish-github:
needs: build-test
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
with:
show-progress: false
- uses: actions/setup-node@v4
with:
node-version: 18
registry-url: https://npm.pkg.github.com/
cache: 'npm'
- run: npm ci --ignore-scripts
- run: npm run build
- run: echo "tag=latest" >> $GITHUB_ENV
- name: Sets npm tag
if: contains(github.event.release.tag_name, 'beta')
run: echo "tag=beta" >> $GITHUB_ENV
- run: npm publish --tag ${{ env.tag }}
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}