Skip to content

Commit 4a09a3c

Browse files
committed
ci: simplify, use native gh release upload
1 parent 50f93c9 commit 4a09a3c

1 file changed

Lines changed: 13 additions & 21 deletions

File tree

.github/workflows/build.yml

Lines changed: 13 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,10 @@ permissions:
66
on:
77
push:
88
branches: [main]
9-
# Trigger only when Makefile is changed
10-
paths: [Makefile]
9+
paths: [Makefile] # trigger only on Makefile change
1110
workflow_dispatch:
1211
schedule:
13-
# Trigger on the 1st day of every month at 12:00 UTC
12+
# trigger on the 1st day of every month at 12:00 UTC
1413
- cron: 0 12 1 * *
1514

1615
jobs:
@@ -21,29 +20,22 @@ jobs:
2120
uses: actions/checkout@v5
2221
with:
2322
ref: main
24-
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal access token.
25-
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository.
26-
- run: mkdir -p release
27-
- name: install dependencies
28-
run: sudo apt install -y curl libarchive-tools jq tar unzip
29-
- name: build package & make hash
23+
persist-credentials: false
24+
fetch-depth: 0 # required to push refs
25+
- name: build
3026
run: |
27+
mkdir -p release
28+
sudo apt install -y curl libarchive-tools jq tar unzip
3129
sudo make
3230
sudo make clean
3331
mv Devuan.zip* release/
34-
- name: save release as artifact
32+
- name: upload as artifact
3533
uses: actions/upload-artifact@v4
3634
with:
3735
retention-days: 90
3836
path: release/*
39-
- name: upload artifact to release
40-
uses: ncipollo/release-action@v1
41-
with:
42-
allowUpdates: True
43-
prerelease: True
44-
tag: action-build
45-
omitBody: True
46-
omitBodyDuringUpdate: True
47-
omitNameDuringUpdate: True
48-
artifacts: release/Devuan.zip*
49-
token: ${{ secrets.GITHUB_TOKEN }}
37+
- name: upload as release
38+
run: gh release upload "${TAG}" --clobber release/Devuan.zip*
39+
env:
40+
GH_TOKEN: ${{ github.token }}
41+
TAG: action-build

0 commit comments

Comments
 (0)