-
Notifications
You must be signed in to change notification settings - Fork 3
51 lines (43 loc) · 1.53 KB
/
release-drafter.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
---
name: Release Drafter
on:
push:
branches:
- master
jobs:
update_release_draft:
name: ✏️ Draft release
permissions:
contents: write
pull-requests: write
runs-on: ubuntu-22.04
steps:
- name: 🚀 Run Release Drafter
id: release_drafter
uses: release-drafter/release-drafter@v6.0.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout
uses: actions/checkout@v4
- name: Generate VCODE
id: generate_vcode
run: echo "vcode=$(expr $(date +%s) / 60 - 26797800)" >> $GITHUB_OUTPUT
- name: Set version
run: |
sed -i 's/$version/${{ steps.release_drafter.outputs.name }}/g' app/version.properties
sed -i 's/$code/${{ steps.generate_vcode.outputs.vcode }}/g' app/version.properties
- name: Commit version
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Configure release information
branch: release/next
create_branch: true
push_options: '--force'
- name: Change target
run: |
curl -X PATCH \
-H 'Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' \
-H 'Accept: application/vnd.github.v3+json' \
-H 'Content-Type: application/json' \
"https://api.github.com/repos/frimtec/pikett-assist/releases/${{ steps.release_drafter.outputs.id }}" \
-d '{"tag_name": "${{ steps.release_drafter.outputs.name }}", "target_commitish": "refs/heads/release/next"}'