Skip to content

chore: release v1.1.0-beta.1 #27

chore: release v1.1.0-beta.1

chore: release v1.1.0-beta.1 #27

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*'
jobs:
release:
permissions:
contents: write
id-token: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: ./.github/setup
- uses: actions/setup-node@v4
with:
node-version: 20.x
registry-url: 'https://registry.npmjs.org'
- name: Check version
id: check_version
run: |
tag=$(echo ${GITHUB_REF#refs/tags/})
if [[ $tag == *"beta"* ]]; then
echo "::set-output name=tag::beta"
elif [[ $tag == *"alpha"* ]]; then
echo "::set-output name=tag::alpha"
else
echo "::set-output name=tag::latest"
fi
- name: Build
run: pnpm build
- run: npx changelogithub
if: steps.check_version.outputs.tag == 'latest'
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Publish to npm
run: npm publish --access public --no-git-checks --tag ${{steps.check_version.outputs.tag}}
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}