Release Patch #8
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 Patch | |
on: workflow_dispatch | |
jobs: | |
release-patch: | |
name: Release Patch | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone repository | |
uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.RELEASE_TOKEN }} | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: .nvmrc | |
cache: yarn | |
- name: Set patch version | |
id: patch_version | |
run: | | |
PATCH_VERSION=$(npm version --no-git-tag-version --no-commit-hooks patch) | |
yarn install | |
echo "PATCH_VERSION=$PATCH_VERSION" >> $GITHUB_OUTPUT | |
- name: Commit, push and create tag | |
uses: EndBug/add-and-commit@v9 | |
with: | |
fetch: true | |
default_author: github_actions | |
message: Release ${{ steps.patch_version.outputs.PATCH_VERSION }} | |
pathspec_error_handling: exitImmediately | |
push: true | |
tag: ${{ steps.patch_version.outputs.PATCH_VERSION }} | |
- name: Create release | |
env: | |
GH_TOKEN: ${{ github.token }} | |
run: gh release create ${{ steps.patch_version.outputs.PATCH_VERSION }} --generate-notes | |
- name: Set next dev version | |
id: dev_version | |
run: | | |
DEV_VERSION=$(npm version --no-git-tag-version --no-commit-hooks prerelease) | |
yarn install | |
echo "DEV_VERSION=$DEV_VERSION" >> $GITHUB_OUTPUT | |
- name: Commit and push | |
uses: EndBug/add-and-commit@v9 | |
with: | |
fetch: true | |
default_author: github_actions | |
message: Set next dev version to ${{ steps.dev_version.outputs.DEV_VERSION }} | |
pathspec_error_handling: exitImmediately | |
push: true |