-
Notifications
You must be signed in to change notification settings - Fork 23
40 lines (33 loc) · 1.16 KB
/
create_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
name: "Create release"
on:
pull_request:
types:
- closed
jobs:
release:
if: github.event.pull_request.merged == true && startsWith(github.event.pull_request.head.ref, 'release/')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Extract version from branch name
id: extract-version
shell: python
run: |
branch_name = "${{ github.event.pull_request.head.ref }}"
version = branch_name.split("/")[1]
print(f"::set-output name=version::{version}")
- name: Extract changelog section for release
id: changelog
uses: coditory/changelog-parser@v1
with:
version: ${{ steps.extract-version.outputs.version }}
- uses: actions/download-artifact@v3
with:
name: ${{ needs.build.outputs.ANDROID_APK_NAME }}
- name: Create release
uses: ncipollo/release-action@v1
with:
artifacts: ${{ needs.build.outputs.ANDROID_APK_NAME }}
body: ${{ steps.changelog.outputs.description }}
token: ${{ secrets.GH_ACTION_TOKEN }}
tag: ${{ steps.extract-version.outputs.version }}