-
Notifications
You must be signed in to change notification settings - Fork 13
66 lines (55 loc) · 1.48 KB
/
prepare-release.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
59
60
61
62
63
64
65
66
name: Prepare new release
on:
workflow_dispatch:
inputs:
version:
description: 'Bump version'
required: true
default: 'false'
type: choice
options:
- 'false'
- major
- minor
- patch
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
bump_version:
runs-on: ubuntu-latest
outputs:
ref: ${{ steps.push-tag.outputs.commit_long_sha }}
steps:
- uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ vars.APP_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
- name: Checkout
uses: actions/checkout@v4
with:
token: '${{ steps.app-token.outputs.token }}'
- name: Bump version
run: scripts/release/bump-version.sh -v "${{ inputs.version }}"
- name: Commit and tag
id: push-tag
uses: EndBug/add-and-commit@v9
with:
default_author: github_actions
message: 'chore: version ${{ env.APP_VERSION }}'
tag: ${{ env.APP_VERSION }}
push: true
prepare_release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Create draft release
uses: softprops/action-gh-release@v2
with:
draft: true
tag_name: ${{ env.APP_VERSION }}
generate_release_notes: true