Skip to content

Commit 8f9390b

Browse files
uznogsxyazi
andcommitted
ci: add automatic nightly builds to the Github Actions workflow (#1397)
Co-authored-by: sxyazi <[email protected]>
1 parent 52681b1 commit 8f9390b

File tree

2 files changed

+32
-2
lines changed

2 files changed

+32
-2
lines changed

.github/workflows/cachix.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
name: Cachix
2+
23
on:
34
push:
4-
branches:
5-
- main
5+
branches: [main]
66

77
jobs:
88
publish:

.github/workflows/draft.yml

+30
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
push:
55
tags:
66
- "v[0-9]+.[0-9]+.[0-9]+"
7+
schedule:
8+
- cron: "0 */8 * * *"
9+
workflow_dispatch:
710

811
jobs:
912
build-unix:
@@ -145,3 +148,30 @@ jobs:
145148
yazi-*.zip
146149
yazi-*.snap
147150
generate_release_notes: true
151+
152+
nightly:
153+
permissions:
154+
contents: write
155+
runs-on: ubuntu-latest
156+
needs: [build-unix, build-windows, build-musl, build-snap]
157+
steps:
158+
- uses: actions/download-artifact@v4
159+
with:
160+
merge-multiple: true
161+
162+
- run: |
163+
echo 'NIGHTLY_BODY<<EOF' >> $GITHUB_ENV
164+
echo "From commit: ${GITHUB_SHA:0:8}" >> $GITHUB_ENV
165+
echo "Generated on: $(date -u +"%Y-%m-%d %H:%M") UTC" >> $GITHUB_ENV
166+
echo "EOF" >> $GITHUB_ENV
167+
168+
- name: Nightly
169+
uses: softprops/action-gh-release@v1
170+
if: github.event_name == 'schedule'
171+
with:
172+
tag_name: "nightly"
173+
prerelease: true
174+
files: |
175+
yazi-*.zip
176+
yazi-*.snap
177+
body: ${{ env.NIGHTLY_BODY }}

0 commit comments

Comments
 (0)