Release #15
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
name: Release | |
on: | |
workflow_dispatch: | |
inputs: | |
dry-run: | |
required: true | |
description: 'Run dry run?' | |
type: boolean | |
default: true | |
jobs: | |
release: | |
permissions: | |
contents: write | |
issues: write | |
pull-requests: write | |
id-token: write | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
persist-credentials: false | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Set dry run env variable | |
run: | | |
if [ "${{ github.event.inputs.dry-run }}" == "true" ]; then | |
echo "PUBLISH=--dry-run" >> $GITHUB_ENV | |
fi | |
- name: Fresh install | |
run: yarn install --immutable --immutable-cache --check-cache | |
- name: Clean dist | |
run: yarn clean | |
- name: Build | |
run: yarn build | |
- name: Install Semantic Release and plugins | |
run: yarn global add semantic-release @semantic-release/git @semantic-release/changelog @semantic-release/github @semantic-release/commit-analyzer @semantic-release/release-notes-generator @semantic-release/npm | |
- run: npx semantic-release $(echo "${{ env.PUBLISH }}") | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |