Bump version to v0.20.5 #302
Workflow file for this run
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: | |
bump: | |
type: choice | |
required: true | |
description: Bump version number | |
options: [major, minor, patch] | |
default: patch | |
pull_request: | |
types: [closed] | |
jobs: | |
bump: | |
if: github.event_name == 'workflow_dispatch' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- run: | | |
git config --global user.name Olivaw[bot] | |
git config --global user.email [email protected] | |
git checkout -b bump/$(npm version ${{ github.event.inputs.bump }}) | |
git push --set-upstream origin HEAD | |
gh pr create --title "Bump version to $(git describe --tags)" --body "Approve me 🤖" | |
gh pr merge --auto --squash | |
env: | |
GITHUB_TOKEN: ${{ secrets.ADMIN_GITHUB_TOKEN }} | |
release: | |
if: github.event.pull_request.merged && startsWith(github.head_ref, 'bump/') | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- run: > | |
gh release create --target ${{ | |
github.event.pull_request.merge_commit_sha }} {--title=CML\ | |
,}"$(basename "$GITHUB_HEAD_REF")" --generate-notes --draft | |
env: | |
GITHUB_TOKEN: ${{ secrets.ADMIN_GITHUB_TOKEN }} | |
package: | |
needs: release | |
secrets: inherit | |
uses: ./.github/workflows/test-deploy.yml | |
with: | |
release: true |