Skip to content

Commit

Permalink
ci(github): update goreleaser
Browse files Browse the repository at this point in the history
  • Loading branch information
LGUG2Z committed Oct 15, 2024
1 parent d4a83f2 commit b0ac84e
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/windows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,42 @@ jobs:
target/wix/komorebi-*.msi
retention-days: 14

# TODO: figure out multi-arch goreleaser check

nightly:
name: Nightly2
needs: build2
runs-on: windows-latest
permissions: write-all
env:
GH_TOKEN: ${{ github.token }}
steps:
- uses: actions/download-artifact@v4
- if: ${{ github.ref == 'refs/heads/master' && github.event_name == 'schedule' }}
run: |
Compress-Archive .\target\x86-64-pc-windows-msvc\release\*.exe komorebi-nightly-x86_64-pc-windows-msvc.zip
Copy-Item ./target/wix/*x86-64.msi -Destination ./komorebi-nightly-x86_64.msi
echo "$((Get-FileHash komorebi-nightly-x86_64-pc-windows-msvc.zip).Hash.ToLower()) komorebi-nightly-x86_64-pc-windows-msvc.zip" >checksums.txt
Compress-Archive .\target\aarch64-pc-windows-msvc\release\*.exe komorebi-nightly-aarch64-pc-windows-msvc.zip
Copy-Item ./target/wix/*aarch64.msi -Destination ./komorebi-nightly-aarch64.msi
echo "$((Get-FileHash komorebi-nightly-aarch64-pc-windows-msvc.zip).Hash.ToLower()) komorebi-nightly-aarch64-pc-windows-msvc.zip" >checksums.txt
- if: ${{ github.ref == 'refs/heads/master' && github.event_name == 'schedule' }}
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})." \
komorebi-nightly-x86_64-pc-windows-msvc.zip \
komorebi-nightly-x86_64.msi \
komorebi-nightly-aarch64-pc-windows-msvc.zip \
komorebi-nightly-aarch64.msi \
checksums.txt
build:
name: Build
runs-on: windows-latest
Expand Down
1 change: 1 addition & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Adapted from https://jondot.medium.com/shipping-rust-binaries-with-goreleaser-d5aa42a46be0
version: 2
project_name: komorebi

before:
Expand Down

0 comments on commit b0ac84e

Please sign in to comment.