Skip to content

Commit 83453f1

Browse files
committed
update workflow
1 parent 29e0b25 commit 83453f1

File tree

1 file changed

+15
-8
lines changed

1 file changed

+15
-8
lines changed

.github/workflows/release-ipk.yaml

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
name: IPK Release
22

33
on:
4-
push:
5-
branches:
6-
- main
4+
release:
5+
types:
6+
- published
77

88
jobs:
99
build:
1010
name: ${{ matrix.arch }}-${{ matrix.sdk }}
1111
runs-on: ubuntu-latest
12+
permissions:
13+
contents: write
1214
strategy:
1315
matrix:
1416
arch:
@@ -19,6 +21,12 @@ jobs:
1921
steps:
2022
- uses: actions/checkout@v4
2123

24+
- name: Override version number
25+
run: |
26+
RELEASE_TAG="${{ github.event.release.tag_name }}"
27+
RELEASE_VERSION="${RELEASE_TAG#v}"
28+
sed -i "s/1\.0\.0/${RELEASE_VERSION}/g" openwrt-support/rtp2httpd/Makefile configure.ac
29+
2230
- name: Move src to openwrt-support
2331
run: mv openwrt-support ../ && mkdir ../openwrt-support/rtp2httpd/src && mv ./* ../openwrt-support/rtp2httpd/src && mv ../openwrt-support ./
2432

@@ -31,8 +39,7 @@ jobs:
3139
NO_SHFMT_CHECK: true
3240
PACKAGES: rtp2httpd
3341

34-
- name: Store packages
35-
uses: actions/upload-artifact@v4
36-
with:
37-
name: ${{ matrix.arch }}-${{ matrix.sdk }}-packages
38-
path: bin/packages/${{ matrix.arch }}/action/*.ipk
42+
- name: Upload to release assets
43+
run: gh release upload --repo ${{ github.repository }} ${{ github.event.release.tag_name }} bin/packages/${{ matrix.arch }}/action/*.ipk
44+
env:
45+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)