Skip to content

chore(release): bump version to 1.0.9 #2

chore(release): bump version to 1.0.9

chore(release): bump version to 1.0.9 #2

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Publish
permissions:
id-token: write # Required for OIDC
contents: write
on:
push:
tags:
- '*'
jobs:
test:
uses: ./.github/workflows/test.yml
create-release:
runs-on: ubuntu-latest
needs: test
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Release
uses: softprops/action-gh-release@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
publish-npm:
needs: create-release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # important: fetch all history and tags
- uses: actions/setup-node@v4
with:
node-version: '20'
registry-url: 'https://registry.npmjs.org'
# Ensure npm 11.5.1 or later is installed
- name: Update npm
run: npm install -g npm@latest
- run: yarn install
- run: npm run build --if-present
- run: |
VERSION=$(node -p "require('./package.json').version")
if [[ "$VERSION" == *"beta"* ]]; then
echo "Publishing beta version: $VERSION"
npm publish --access public --tag beta
elif [[ "$VERSION" == *"rc"* ]]; then
echo "Publishing release candidate version: $VERSION"
npm publish --access public --tag rc
else
echo "Publishing stable version: $VERSION"
npm publish --access public --tag latest
fi