-
Notifications
You must be signed in to change notification settings - Fork 1
75 lines (66 loc) · 2.59 KB
/
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
name: Release
on:
workflow_dispatch:
inputs:
update_type:
description: Update type
required: true
type: choice
options:
- patch
- minor
- major
permissions: read-all
jobs:
initiate:
name: Initiate
runs-on: ubuntu-24.04
permissions:
contents: write # To push a commit
pull-requests: write # To open a Pull Request
steps:
- name: Checkout repository
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
with:
persist-credentials: false
- name: Install Node.js
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
cache: npm
node-version-file: .nvmrc
- name: Create token to create Pull Request
uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2.1.0
id: automation-token
with:
app_id: ${{ secrets.AUTOMATION_ID }}
private_key: ${{ secrets.AUTOMATION_PRIVATE_KEY }}
- name: Bump version
env:
UPDATE_TYPE: ${{ github.event.inputs.update_type }}
run: node scripts/bump-version.js "${UPDATE_TYPE}"
- name: Update the changelog
run: node scripts/bump-changelog.js
- name: Create Pull Request
uses: peter-evans/create-pull-request@4320041ed380b20e97d388d56a7fb4f9b8c20e79 # v7.0.0
with:
token: ${{ steps.automation-token.outputs.token }}
title: New ${{ github.event.inputs.update_type }} release for v0
body: |
_This Pull Request was created automatically_
---
### Merge checklist
- [ ] All continuous integration checks passed.
- [ ] The version number is updated in `Containerfile`.
- [ ] The new release is added to `CHANGELOG.md` with the correct version number and date.
- [ ] The new version number is in accordance with the [Semantic Versioning] rules.
- [ ] There are no other changes in the Pull Request.
### Post-merge
_It will take a few minutes for this to happen._
- [ ] The new version is published to [Docker].
- [ ] A git tag for the new release is created.
- [ ] The major version branch is updated.
[docker]: https://hub.docker.com/r/ericornelissen/js-re-scan
[semantic versioning]: https://semver.org/spec/v2.0.0.html
branch: release-${{ github.event.inputs.update_type }}
branch-suffix: random
commit-message: Version bump