Skip to content

Bump version to 1.0.9 #27

Bump version to 1.0.9

Bump version to 1.0.9 #27

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*'
permissions:
contents: write
id-token: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: main
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
registry-url: 'https://registry.npmjs.org'
- name: Update package.json version
run: |
VERSION=${GITHUB_REF#refs/tags/v}
CURRENT_VERSION=$(node -p "require('./package.json').version")
if [ "$CURRENT_VERSION" != "$VERSION" ]; then
echo "Updating version from $CURRENT_VERSION to $VERSION"
npm version $VERSION --no-git-tag-version
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add package.json
git commit -m "Update version to $VERSION"
git push
else
echo "Version already set to $VERSION, skipping update"
fi
- name: Update npm
run: npm install -g npm@latest
- run: npm publish
- name: Create Release
uses: softprops/action-gh-release@v1
with:
generate_release_notes: true