version_bump #109
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: version_bump | |
permissions: | |
contents: write | |
on: | |
workflow_dispatch: | |
inputs: | |
releaseKind: | |
description: 'Kind of version upgrade. If you like to only change prerelease id, select "none"' | |
default: 'patch' | |
type: choice | |
options: | |
- patch | |
- minor | |
- major | |
- none | |
required: true | |
prereleaseId: | |
description: 'Prerelease id to append. If you don''t need append it, keep this blank' | |
type: string | |
jobs: | |
build: | |
name: version bump | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- name: Configure git | |
run: | | |
git config --global core.symlinks true | |
git config --global fetch.parallel 32 | |
- name: Clone repository | |
uses: actions/checkout@v3 | |
- name: Install deno | |
uses: denoland/setup-deno@v1 | |
with: | |
deno-version: canary | |
- name: Run version bump | |
run: | | |
deno run --allow-read=. --allow-write=. jsr:@kt3k/[email protected] --${{github.event.inputs.releaseKind}} | |
if: github.event.inputs.releaseKind != 'none' | |
- name: Append prerelease id if necessary | |
run: | | |
deno run --allow-read=. --allow-write=. jsr:@kt3k/[email protected] --preid ${{github.event.inputs.prereleaseId}} | |
if: github.event.inputs.prereleaseId | |
- name: Create PR | |
env: | |
GITHUB_TOKEN: ${{ secrets.DENOBOT_PAT }} | |
GH_WORKFLOW_ACTOR: ${{ github.actor }} | |
run: | | |
git config user.email "${{ github.actor }}@users.noreply.github.com" | |
git config user.name "${{ github.actor }}" | |
./tools/release/create_pr.ts |