-
Notifications
You must be signed in to change notification settings - Fork 104
58 lines (51 loc) · 1.63 KB
/
version_bump.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
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