-
-
Notifications
You must be signed in to change notification settings - Fork 8
98 lines (93 loc) · 3.23 KB
/
prepare-for-a-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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
name: Prepare for a release
on:
push:
tags:
- 'release-[0-9]+.[0-9]+.[0-9]+'
concurrency: prepare-for-a-release
jobs:
# all tasks that need to be done before we add an X.Y.Z tag
# should be done as a step in the pre-tagging job.
# think of it like this... if when you later checkout the tag for a release,
# should the change be there? if yes, do it here.
pre-tagging:
name: Tasks run before tagging the release
runs-on: ubuntu-latest
steps:
- name: Checkout main
uses: actions/checkout@v4.1.1
with:
ref: "main"
token: ${{ secrets.RELEASE_TOKEN }}
- name: Update CHANGELOG.md
uses: docker://ghcr.io/ponylang/release-bot-action:0.6.3
with:
entrypoint: update-changelog-for-release
env:
GIT_USER_NAME: "Ponylang Main Bot"
GIT_USER_EMAIL: "ponylang.main@gmail.com"
- name: Update VERSION
uses: docker://ghcr.io/ponylang/release-bot-action:0.6.3
with:
entrypoint: update-version-in-VERSION
env:
GIT_USER_NAME: "Ponylang Main Bot"
GIT_USER_EMAIL: "ponylang.main@gmail.com"
- name: Update version in README
uses: docker://ghcr.io/ponylang/release-bot-action:0.6.3
with:
entrypoint: update-version-in-README
env:
GIT_USER_NAME: "Ponylang Main Bot"
GIT_USER_EMAIL: "ponylang.main@gmail.com"
- name: Update corral.json
uses: docker://ghcr.io/ponylang/release-bot-action:0.6.3
with:
entrypoint: update-version-in-corral-json
env:
GIT_USER_NAME: "Ponylang Main Bot"
GIT_USER_EMAIL: "ponylang.main@gmail.com"
# tag for release
# this will kick off the next stage of the release process
# no additional steps should be added to this job
tag-release:
name: Tag the release
needs:
- pre-tagging
runs-on: ubuntu-latest
steps:
- name: Checkout main
uses: actions/checkout@v4.1.1
with:
ref: "main"
token: ${{ secrets.RELEASE_TOKEN }}
- name: Trigger artefact creation
uses: docker://ghcr.io/ponylang/release-bot-action:0.6.3
with:
entrypoint: trigger-artefact-creation
env:
GIT_USER_NAME: "Ponylang Main Bot"
GIT_USER_EMAIL: "ponylang.main@gmail.com"
# all cleanup tags that should happen after tagging for release should happen
# in the post-tagging job. examples of things you might do:
# add a new unreleased section to a changelog
# set a version back to "snapshot"
# in general, post-tagging is for "going back to normal" from tasks that were
# done during the pre-tagging job
post-tagging:
name: Tasks run after tagging the release
needs:
- tag-release
runs-on: ubuntu-latest
steps:
- name: Checkout main
uses: actions/checkout@v4.1.1
with:
ref: "main"
token: ${{ secrets.RELEASE_TOKEN }}
- name: Add "unreleased" section to CHANGELOG.md
uses: docker://ghcr.io/ponylang/release-bot-action:0.6.3
with:
entrypoint: add-unreleased-section-to-changelog
env:
GIT_USER_NAME: "Ponylang Main Bot"
GIT_USER_EMAIL: "ponylang.main@gmail.com"