Release #21
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
# https://docs.github.com/en/actions/guides/publishing-nodejs-packages | |
# https://futurestud.io/tutorials/github-actions-run-a-workflow-when-creating-a-tag | |
name: Release | |
on: | |
push: | |
tags: | |
- '*' | |
release: | |
types: [published] | |
workflow_dispatch: | |
jobs: | |
publish-npm: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [20.x] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
registry-url: https://registry.npmjs.org/ | |
- name: Enable Corepack | |
run: corepack enable | |
- name: Install Corepack | |
run: corepack install | |
- name: Install dependencies | |
run: yarn install --immutable | |
- name: Build | |
run: yarn build | |
- name: Publish packages | |
run: yarn release:publish | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} | |
# - name: Create Github Release | |
# uses: docker://antonyurchenko/git-release:latest | |
# env: | |
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# ALLOW_TAG_PREFIX: "true" |