Skip to content

Commit 9199c03

Browse files
authored
ci: support automatically creating github release (#41)
1 parent 2b29c60 commit 9199c03

File tree

2 files changed

+30
-2
lines changed

2 files changed

+30
-2
lines changed

.github/release.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
changelog:
2+
categories:
3+
- title: Feature
4+
labels:
5+
- enhancement
6+
- title: Fix
7+
labels:
8+
- bug
9+
- title: Other Changes
10+
labels:
11+
- "*"

.github/workflows/release.yml

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,14 @@ env:
1111
jobs:
1212
release:
1313
runs-on: ubuntu-latest
14+
permissions:
15+
contents: write
1416
steps:
1517
- uses: actions/checkout@v3
1618
with:
1719
ref: main
1820
fetch-depth: 0
19-
token : ${{ secrets.PROJECT_TOKEN }}
21+
token: ${{ secrets.PROJECT_TOKEN }}
2022
- name: Modify for next release
2123
run: |
2224
chmod +x release.sh
@@ -26,4 +28,19 @@ jobs:
2628
git config user.email '${{ vars.USER_EMAIL }}'
2729
git add .
2830
git commit -m 'release: clickstream Android ${{ env.NEW_VERSION }}'
29-
git push
31+
git push
32+
git tag v${{ env.NEW_VERSION }}
33+
git push origin v${{ env.NEW_VERSION }}
34+
- name: Assemble release
35+
run: |
36+
chmod +x gradlew
37+
./gradlew assembleRelease
38+
- name: Create GitHub release
39+
uses: softprops/action-gh-release@v1
40+
with:
41+
name: "Clickstream Android ${{ env.NEW_VERSION }}"
42+
files: |
43+
clickstream/build/outputs/aar/clickstream-release.aar
44+
tag_name: "v${{ env.NEW_VERSION }}"
45+
prerelease: true
46+
generate_release_notes: true

0 commit comments

Comments
 (0)