Skip to content

Commit

Permalink
ci: add automatic nightly builds to the Github Actions workflow (#1397)
Browse files Browse the repository at this point in the history
Co-authored-by: sxyazi <[email protected]>
  • Loading branch information
uznog and sxyazi committed Aug 7, 2024
1 parent 52681b1 commit f865910
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/cachix.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: Cachix

on:
push:
branches:
- main
branches: [main]

jobs:
publish:
Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/draft.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
schedule:
- cron: "0 */6 * * *"
workflow_dispatch:

jobs:
build-unix:
Expand Down Expand Up @@ -145,3 +148,31 @@ jobs:
yazi-*.zip
yazi-*.snap
generate_release_notes: true

nightly:
permissions:
contents: write
runs-on: ubuntu-latest
needs: [build-unix, build-windows, build-musl, build-snap]
steps:
- uses: actions/download-artifact@v4
with:
merge-multiple: true

- run: |
echo 'NIGHTLY_BODY<<EOF' >> $GITHUB_ENV
echo "From commit: ${GITHUB_SHA:0:8}" >> $GITHUB_ENV
echo "Generated on: $(date -u +"%Y-%m-%d %H:%M") UTC" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
- name: Nightly
uses: softprops/action-gh-release@v1
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
with:
tag_name: nightly
prerelease: true
files: |
yazi-*.zip
yazi-*.snap
name: Nightly Build
body: ${{ env.NIGHTLY_BODY }}

0 comments on commit f865910

Please sign in to comment.