Skip to content

Commit

Permalink
ci(github): add nightly releases on master
Browse files Browse the repository at this point in the history
  • Loading branch information
LGUG2Z committed Jul 4, 2024
1 parent 128db85 commit d47653f
Showing 1 changed file with 21 additions and 3 deletions.
24 changes: 21 additions & 3 deletions .github/workflows/windows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,17 @@ on:
tags:
- v*
schedule:
- cron: "30 0 * * 1" # Every Monday at half past midnight UTC
- cron: "30 0 * * 0" # Every day at 00:30 UTC

jobs:
build:
name: Build
runs-on: windows-latest
permissions:
contents: write
env:
RUSTFLAGS: -Ctarget-feature=+crt-static
GH_TOKEN: ${{ github.token }}
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -96,15 +99,30 @@ jobs:
target/${{ matrix.target }}/release/komorebi-gui.exe
target/${{ matrix.target }}/release/komorebi.pdb
target/${{ matrix.target }}/release/komorebic.pdb
target/${{ matrix.target }}/release/komorebi-gui.pdb
target/${{ matrix.target }}/release/komorebi_gui.pdb
target/wix/komorebi-*.msi
retention-days: 7
- name: Check GoReleaser
uses: goreleaser/goreleaser-action@v3
with:
version: latest
args: build --skip=validate --clean

- name: Update nightly
if: github.ref == 'refs/heads/master'
shell: bash
run: |
gh release delete nightly --yes || true
git push origin :nightly || true
gh release create nightly \
--target $GITHUB_SHA \
--prerelease \
--title "komorebi nightly (${GITHUB_SHA})" \
--notes "This nightly release of komorebi corresponds to [this commit](https://github.com/LGUG2Z/komorebi/commit/${GITHUB_SHA})." \
target/${{ matrix.target }}/release/komorebi.exe \
target/${{ matrix.target }}/release/komorebic.exe \
target/${{ matrix.target }}/release/komorebic-no-console.exe \
target/${{ matrix.target }}/release/komorebi-gui.exe \
target/wix/komorebi-*.msi
# Release
- name: Generate changelog
if: startsWith(github.ref, 'refs/tags/v')
Expand Down

0 comments on commit d47653f

Please sign in to comment.