Release #1
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 | |
on: | |
workflow_dispatch: | |
inputs: | |
type: | |
description: 'New version type [new-version | major | minor | patch]' | |
required: true | |
default: 'patch' | |
jobs: | |
bumpVersion: | |
runs-on: ubuntu-22.04 | |
steps: | |
- run: | | |
echo "New version type: ${{ github.event.inputs.type }}" | |
- name: Setup checkout | |
uses: actions/checkout@v3 | |
with: | |
# Use a PAT to ensure that | |
# commits are authored with a specific user | |
# workflow run are triggered after git push | |
token: ${{ secrets.GH_RELEASE_TOKEN }} | |
- name: Build Setup | |
uses: ./.github/actions/build-setup | |
- name: Config git | |
run: | | |
git config --local user.email "${{ vars.PA_BOT_EMAIL }}" | |
git config --local user.name "${{ vars.PA_BOT_NAME }}" | |
git config pull.rebase true | |
- name: Checkout default branch | |
run: git checkout main && git pull --tags | |
- name: Bump Version | |
run: | | |
npm version ${{ github.event.inputs.type }} --no-commit-hooks --message "chore(release): %s" | |
- name: Push Version | |
run: git push && git push --tags |