-
Notifications
You must be signed in to change notification settings - Fork 2
73 lines (61 loc) · 2.48 KB
/
create-release-pr.yml
File metadata and controls
73 lines (61 loc) · 2.48 KB
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
67
68
69
70
71
72
73
name: create_release_pr
on:
workflow_dispatch:
inputs:
beta_release:
description: 'Create a beta release'
required: true
default: false
type: boolean
env:
SCCACHE_GHA_ENABLED: 'true'
RUSTC_WRAPPER: 'sccache'
jobs:
create_release_pr:
name: create_release_pr
runs-on: ubuntu-latest
environment: release
permissions:
contents: write
steps:
- name: Create GitHub App Token
uses: actions/create-github-app-token@f8d387b68d61c58ab83c6c016672934102569859 # v3
id: generate_token
with:
app-id: ${{ vars.PR_AUTOMATION_BOT_PUBLIC_APP_ID }}
private-key: ${{ secrets.PR_AUTOMATION_BOT_PUBLIC_PRIVATE_KEY }}
- name: Checkout Code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
- name: Setup Python
uses: dfinity/ci-tools/actions/setup-python@afeee4fbdc0683a88ec5a74ed7f59a2ce0e833ad # main
- name: Setup Commitizen
uses: dfinity/ci-tools/actions/setup-commitizen@afeee4fbdc0683a88ec5a74ed7f59a2ce0e833ad # main
- name: Setup PNPM
uses: dfinity/ci-tools/actions/setup-pnpm@afeee4fbdc0683a88ec5a74ed7f59a2ce0e833ad # main
- name: Run sccache-cache
uses: mozilla-actions/sccache-action@7d986dd989559c6ecdb630a3fd2557667be217ad # v0.0.9
- name: Build package
run: pnpm build
- name: Bump version
id: bump_version
uses: dfinity/ci-tools/actions/bump-version@afeee4fbdc0683a88ec5a74ed7f59a2ce0e833ad # main
with:
prerelease: ${{ inputs.beta_release == true && 'beta' || '' }}
major_version_zero: true
- name: Print Version
run: echo "Bumping to version ${{ steps.bump_version.outputs.version }}"
- name: Create Pull Request
uses: dfinity/ci-tools/actions/create-pr@afeee4fbdc0683a88ec5a74ed7f59a2ce0e833ad # main
with:
token: ${{ steps.generate_token.outputs.token }}
branch_name: 'release/${{ steps.bump_version.outputs.version }}'
pull_request_title: 'chore: release ${{ steps.bump_version.outputs.version }}'
pull_request_body: |
After merging this PR, tag the merge commit with:
```shell
git tag ${{ steps.bump_version.outputs.version }}
git push origin ${{ steps.bump_version.outputs.version }}
```
commit_message: 'chore: release ${{ steps.bump_version.outputs.version }}'