release ci

This commit is contained in:
Robin Appelman 2026-05-03 23:06:23 +02:00
commit 47b6e9a287

View file

@ -1,41 +1,34 @@
name: Release
on:
release:
types: [created]
push:
tags: ["*"]
permissions:
contents: write
jobs:
build:
publish:
runs-on: nix
strategy:
fail-fast: false
matrix:
include:
- binary-suffix: ".exe"
target: x86_64-pc-windows-gnu
- binary-suffix: ""
target: x86_64-unknown-linux-musl
- binary-suffix: ""
target: i686-unknown-linux-musl
- binary-suffix: ""
target: armv7-unknown-linux-musleabihf
- binary-suffix: ""
target: aarch64-unknown-linux-musl
steps:
- uses: actions/checkout@v4
- uses: https://codeberg.org/icewind/attic-action@v1
with:
name: link
instance: https://cache.icewind.link
authToken: "${{ secrets.ATTIC_TOKEN }}"
- run: nix build .#${{ matrix.target }}
- name: Upload binary to release
uses: https://github.com/svenstaro/upload-release-action@v2
- name: Collect assets
run: |
mkdir assets
for asset in x86_64-unknown-linux-musl aarch64-unknown-linux-musl i686-unknown-linux-musl armv7-unknown-linux-musleabihf; do
nix build .#$asset
cp result/bin/sidewindow assets/$asset
done
nix build .#x86_64-pc-windows-gnu
cp result/bin/sidewindow.exe assets/x86_64-pc-windows-gnu.exe
- name: Create release
uses: https://code.forgejo.org/actions/forgejo-release@v2.11.3
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: result/bin/sidewindow${{ matrix.binary-suffix }}
asset_name: sidewindow-${{ matrix.target }}${{ matrix.binary-suffix }}
tag: ${{ github.ref }}
direction: upload
release-dir: assets
token: "${{ secrets.FORGEJO_TOKEN }}"