-
Notifications
You must be signed in to change notification settings - Fork 1
42 lines (41 loc) · 1.29 KB
/
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
name: Release Next Version
on:
push:
branches: [ "*" ]
jobs:
release:
# if: ${{ startsWith(github.event.head_commit.message, 'release:') }}
runs-on: ubuntu-latest
env:
COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
permissions:
contents: write
steps:
- uses: actions/checkout@v3
with:
ref: main
fetch-depth: 0
token: ${{ secrets.PROJECT_TOKEN }}
- name: Create new tag
run: |
echo "${{ env.COMMIT_MESSAGE }}"
version=$(echo "${{ env.COMMIT_MESSAGE }}" | grep -oP 'Android \K\d+\.\d+\.\d+')
echo $version
echo v$version
# git config user.name '${{ vars.USER_NAME }}'
# git config user.email '${{ vars.USER_EMAIL }}'
# git tag v$version
# git push origin v$version
# - name: Assemble release
# run: |
# chmod +x gradlew
# ./gradlew assembleRelease
# - name: Create GitHub release
# uses: softprops/action-gh-release@v1
# with:
# name: "Clickstream Android ${{ env.NEW_VERSION }}"
# files: |
# clickstream/build/outputs/aar/clickstream-release.aar
# tag_name: "v${{ env.NEW_VERSION }}"
# prerelease: true
# generate_release_notes: true