-
Notifications
You must be signed in to change notification settings - Fork 2
61 lines (51 loc) · 1.72 KB
/
merge-automated-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
# Alexander Tebiev - https://github.com/beeyev
name: Automated release
on:
push:
branches: [ master ]
# pull_request:
# branches: [master]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
prepare:
name: Check if automated release is needed
runs-on: ubuntu-latest
outputs:
pr_found: ${{ steps.PR.outputs.pr_found == 'true' && contains(steps.PR.outputs.pr_labels, 'filter-list-update') }}
pr_body: ${{ steps.PR.outputs.pr_body }}
steps:
- name: Get current PR
uses: 8BitJonny/[email protected]
id: PR
- name: PR details
run: |
echo "Is pr found? - ${{ steps.PR.outputs.pr_found }}"
echo "PR number is - ${{ steps.PR.outputs.number }}"
automated-release:
name: Automated release
runs-on: ubuntu-latest
needs: prepare
if: needs.prepare.outputs.pr_found == 'true'
steps:
- name: Check out code
uses: actions/checkout@v4
- name: PR details
run: |
echo "pr found? - ${{ needs.prepare.outputs.pr_found }}"
echo "PR body - ${{ needs.prepare.outputs.pr_body }}"
- name: Bump version and push tag
id: tag_version
uses: mathieudutour/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Create new release
uses: softprops/action-gh-release@v2
with:
name: "${{ steps.tag_version.outputs.new_tag }} - (filter list update)"
tag_name: ${{ steps.tag_version.outputs.new_tag }}
body: ${{ needs.prepare.outputs.pr_body }}
generate_release_notes: true
make_latest: true