Skip to content

Commit 46c5e5a

Browse files
committed
docs: provide additional workflow example enabling release events
To simplify setup in our own repos, I'm adding another example workflow file that uses the organization admin token in the release step, to allow triggering a release workflow event (which will be necessary for us to trigger documenation builds). Signed-off-by: Matthew Weier O'Phinney <[email protected]>
1 parent 99877aa commit 46c5e5a

File tree

1 file changed

+57
-0
lines changed

1 file changed

+57
-0
lines changed
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions
2+
3+
name: "Automatic Releases"
4+
5+
on:
6+
milestone:
7+
types:
8+
- "closed"
9+
10+
jobs:
11+
release:
12+
name: "GIT tag, release & create merge-up PR"
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: "Checkout"
17+
uses: "actions/checkout@v2"
18+
19+
- name: "Release"
20+
uses: "laminas/automatic-releases@v1"
21+
with:
22+
command-name: "laminas:automatic-releases:release"
23+
env:
24+
"GITHUB_TOKEN": ${{ secrets.ORGANIZATION_ADMIN_TOKEN }}
25+
"SIGNING_SECRET_KEY": ${{ secrets.SIGNING_SECRET_KEY }}
26+
"GIT_AUTHOR_NAME": ${{ secrets.GIT_AUTHOR_NAME }}
27+
"GIT_AUTHOR_EMAIL": ${{ secrets.GIT_AUTHOR_EMAIL }}
28+
29+
- name: "Create Merge-Up Pull Request"
30+
uses: "laminas/automatic-releases@v1"
31+
with:
32+
command-name: "laminas:automatic-releases:create-merge-up-pull-request"
33+
env:
34+
"GITHUB_TOKEN": ${{ secrets.GITHUB_TOKEN }}
35+
"SIGNING_SECRET_KEY": ${{ secrets.SIGNING_SECRET_KEY }}
36+
"GIT_AUTHOR_NAME": ${{ secrets.GIT_AUTHOR_NAME }}
37+
"GIT_AUTHOR_EMAIL": ${{ secrets.GIT_AUTHOR_EMAIL }}
38+
39+
- name: "Create and/or Switch to new Release Branch"
40+
uses: "laminas/automatic-releases@v1"
41+
with:
42+
command-name: "laminas:automatic-releases:switch-default-branch-to-next-minor"
43+
env:
44+
"GITHUB_TOKEN": ${{ secrets.ORGANIZATION_ADMIN_TOKEN }}
45+
"SIGNING_SECRET_KEY": ${{ secrets.SIGNING_SECRET_KEY }}
46+
"GIT_AUTHOR_NAME": ${{ secrets.GIT_AUTHOR_NAME }}
47+
"GIT_AUTHOR_EMAIL": ${{ secrets.GIT_AUTHOR_EMAIL }}
48+
49+
- name: "Bump Changelog Version On Originating Release Branch"
50+
uses: "laminas/automatic-releases@v1"
51+
with:
52+
command-name: "laminas:automatic-releases:bump-changelog"
53+
env:
54+
"GITHUB_TOKEN": ${{ secrets.GITHUB_TOKEN }}
55+
"SIGNING_SECRET_KEY": ${{ secrets.SIGNING_SECRET_KEY }}
56+
"GIT_AUTHOR_NAME": ${{ secrets.GIT_AUTHOR_NAME }}
57+
"GIT_AUTHOR_EMAIL": ${{ secrets.GIT_AUTHOR_EMAIL }}

0 commit comments

Comments
 (0)