Skip to content

Commit fcf33a9

Browse files
update release workflow
1 parent 5e8ba91 commit fcf33a9

File tree

2 files changed

+13
-11
lines changed

2 files changed

+13
-11
lines changed

.github/workflows/android.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ name: Android CI
33
on:
44
push:
55
branches: ["main"]
6+
tags:
7+
- "v*"
68
pull_request:
79
branches: ["main"]
810

.github/workflows/release.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,29 +10,29 @@ on:
1010
jobs:
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 }}

0 commit comments

Comments
 (0)