Skip to content

Commit b2f93dc

Browse files
author
MochiOS Team
committed
publish iso as nightly github release so it shows on repo front page
1 parent 81bf926 commit b2f93dc

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

‎.github/workflows/build-iso.yml‎

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ on:
55
branches: [main]
66
workflow_dispatch:
77

8+
env:
9+
RELEASE_TAG: nightly
10+
811
jobs:
912
build:
1013
runs-on: ubuntu-latest
@@ -59,3 +62,23 @@ jobs:
5962
name: mochios-iso
6063
path: /tmp/mochios/out/*.iso
6164
retention-days: 30
65+
66+
release:
67+
needs: build
68+
runs-on: ubuntu-latest
69+
permissions:
70+
contents: write
71+
steps:
72+
- uses: actions/download-artifact@v4
73+
with:
74+
name: mochios-iso
75+
path: /tmp/iso
76+
77+
- name: publish release
78+
run: |
79+
cd /tmp/iso
80+
iso=$(ls *.iso 2>/dev/null | head -1)
81+
if [ -z "$iso" ]; then echo "no iso found"; exit 1; fi
82+
gh release view "$RELEASE_TAG" --json url &>/dev/null && \
83+
gh release upload "$RELEASE_TAG" "$iso" --clobber || \
84+
gh release create "$RELEASE_TAG" "$iso" --title "MochiOS Nightly" --notes "auto-built from main" --prerelease

0 commit comments

Comments
 (0)