Skip to content

Merge pull request #22 from bitflight-devops/add-claude-github-action… #9

Merge pull request #22 from bitflight-devops/add-claude-github-action…

Merge pull request #22 from bitflight-devops/add-claude-github-action… #9

Workflow file for this run

name: 🏷️ Update Package Version and Create Tag
on:
push:
branches:
- 'main'
tags-ignore:
- '**'
jobs:
tag:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
name: Checkout
with:
fetch-depth: 0
- name: Set Git User Details
run: |
git config user.name "${GITHUB_USER:-github-actions}"
git config user.email "${GITHUB_EMAIL:-github-actions@github.com}"
- uses: actions/setup-node@v6
with:
node-version: '22'
cache: 'yarn'
- name: Bump version and push tag
id: tag_version
uses: mathieudutour/github-tag-action@v6.2
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
tag_prefix: 'v'
dry_run: 'true'
- name: Install project dependencies
run: yarn --prefer-offline
- name: Build
run: yarn run build
- run: git add dist
- run: |
yarn config set version-tag-prefix "v"
yarn config set version-commit-hooks true
yarn config set version-git-tag true
yarn config set version-sign-git-tag false
- name: Update version
id: version
env:
CHANGELOG: |
# v%s
${{ steps.tag_version.outputs.changelog }}
run: |
## yarn version will update the README with the new tagged version in the examples
## and also creates a step output called 'tag' which is the new version
set -x
yarn version --patch --message "${CHANGELOG}"
- name: Create a GitHub release
uses: softprops/action-gh-release@v2.5.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{steps.version.outputs.tag}}
name: Release ${{steps.version.outputs.tag}}
body: ${{ steps.tag_version.outputs.changelog }}