-
Notifications
You must be signed in to change notification settings - Fork 0
91 lines (80 loc) · 2.49 KB
/
bump_version_release.yaml
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
name: Bump version and release
on:
workflow_dispatch:
inputs:
repo:
type: choice
required: true
options:
- "RF24"
- "RF24Network"
- "RF24Mesh"
- "RF24Gateway"
- "RF24Ethernet"
- "RF24Audio"
- "CircuitPython_nRF24L01"
- "pyRF24"
branch:
type: string
required: true
default: master
bump-component:
type: choice
default: 'patch'
required: true
options:
- 'major'
- 'minor'
- 'patch'
run-name: Deploying ${{ inputs.repo }} ${{ inputs.branch }}
jobs:
release-version-bump:
runs-on: ubuntu-latest
steps:
- name: checkout ${{ inputs.repo }}
uses: actions/checkout@v4
with:
repository: nRF24/${{ inputs.repo }}
ref: ${{ inputs.branch }}
fetch-depth: 0
path: ${{ inputs.repo }}
token: ${{ secrets.BUMP_N_RELEASE }}
- name: checkout org repo
uses: actions/checkout@v4
with:
path: org-repo
- uses: actions/setup-python@v5
with:
# here we need v3.10+
python-version: 3.x
- run: rustup update --no-self-update
- name: Install cargo-binstall
uses: cargo-bins/cargo-binstall@main
- name: Install git-cliff
run: cargo binstall -y git-cliff --install-path org-repo
- name: increment version
working-directory: ${{ inputs.repo }}
id: inc-ver
run: >-
python "../org-repo/.github/workflows/increment_version.py"
--bump=${{ inputs.bump-component }}
--update-metadata
- name: push metadata changes
working-directory: ${{ inputs.repo }}
if: steps.inc-ver.outputs.made-changes == 'true'
run: |-
git config --global user.name "${GITHUB_ACTOR}"
git config --global user.email "${GITHUB_ACTOR_ID}+${GITHUB_ACTOR}@users.noreply.github.com"
git add --all
git commit -m "bump version to v${{ steps.inc-ver.outputs.new-version }}"
git push
- name: publish release
env:
GH_TOKEN: ${{ secrets.BUMP_N_RELEASE }}
run: >-
gh release create
v${{ steps.inc-ver.outputs.new-version }}
--notes-file ${{ steps.inc-ver.outputs.release-notes }}
--repo nRF24/${{ inputs.repo }}
--target ${{ inputs.branch }}
--title v${{ steps.inc-ver.outputs.new-version }}