File tree Expand file tree Collapse file tree 2 files changed +13
-11
lines changed
Expand file tree Collapse file tree 2 files changed +13
-11
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,8 @@ name: Android CI
33on :
44 push :
55 branches : ["main"]
6+ tags :
7+ - " v*"
68 pull_request :
79 branches : ["main"]
810
Original file line number Diff line number Diff line change 1010jobs :
1111 release :
1212 runs-on : ubuntu-latest
13- if : github.event.workflow_run.conclusion == 'success' && startsWith(github.ref, 'refs/tags/')
13+ permissions :
14+ contents : write
15+ if : github.event.workflow_run.conclusion == 'success' && startsWith(github.event.workflow_run.head_branch, 'v') && contains(github.event.workflow_run.head_branch, '.')
1416 steps :
1517 - uses : actions/checkout@v4
1618 - name : Download artifact
1719 uses : actions/download-artifact@v4
1820 with :
1921 name : ${{ github.sha }}-build
2022 path : ./artifacts
21- - name : Extract release files
23+ github-token : ${{ secrets.GITHUB_TOKEN }}
24+ run-id : ${{ github.event.workflow_run.id }}
25+
26+ - name : Extract Release Files
2227 run : |
2328 mkdir -p ./release
24- cp ./artifacts/faklinker -lib-debug.aar ./release/fakelinker-debug.aar
29+ cp ./artifacts/fakelinker -lib-debug.aar ./release/fakelinker-debug.aar
2530 cp ./artifacts/fakelinker-lib-release.aar ./release/fakelinker-release.aar
26- - name : Upload release files
27- uses : actions/upload-artifact@v3
28- with :
29- name : ${{ github.sha }}-release
30- path : ./release
31- retention-days : 1
32-
33- - name : release
31+ - name : Release Tag
3432 uses : softprops/action-gh-release@v2
3533 with :
3634 files : |
3735 release/fakelinker-debug.aar
3836 release/fakelinker-release.aar
37+ name : ${{ github.event.workflow_run.head_branch }}
38+ tag_name : ${{ github.event.workflow_run.head_branch }}
You can’t perform that action at this time.
0 commit comments