-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (56 loc) · 2.08 KB
/
prepare-release.yml
File metadata and controls
66 lines (56 loc) · 2.08 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
name: Prepare Release
on: workflow_dispatch
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: write
pull-requests: write
env:
# pnpm doesn't like the package & branch changes that happen when preparing a release,
# and `verifyDepsBeforeRun` causes failures. So we'll disable the hooks that activate pnpm.
HUSKY: 0
jobs:
prepare-release-pr:
name: Prepare PR for release
runs-on: ubuntu-latest
# Only run for the original repo, and only the default branch, and only if it's properly protected
if: |
(! github.event.push.head.repo.fork)
&& github.ref == format('refs/heads/{0}', github.event.repository.default_branch)
&& github.ref_protected == true
permissions:
contents: write
pull-requests: write
id-token: write
steps:
- uses: actions/checkout@0c366fd6a839edf440554fa01a7085ccba70ac98
with:
fetch-depth: 0
- uses: ./.github/reusable-workflows/setup-repo
with:
node-version: nvmrc
- name: Prepare release
run: pnpm run release:prep
- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@1c06494168d0ed3f75efd4e4e0c8412310a0b87a
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.PASSPHRASE }}
git_user_signingkey: true
git_commit_gpgsign: true
- name: Create pull request
uses: peter-evans/create-pull-request@eec7ab75b2f71ddc8a223341c83a67f6f774c39f
id: cpr
with:
branch: prepare-release
committer: Steven Pautz (Github Actions) <spautz@gmail.com>
commit-message: Prepare release (automated)
title: Prepare release (automated)
delete-branch: true
token: ${{ secrets.PAT }}
- name: Check outputs
if: ${{ steps.cpr.outputs.pull-request-number }}
run: |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"