From 47b6e9a287548919d907c4075cced6634f73a3e4 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Sun, 3 May 2026 23:06:23 +0200 Subject: [PATCH] release ci --- .forgejo/workflows/release.yml | 43 ++++++++++++++-------------------- 1 file changed, 18 insertions(+), 25 deletions(-) diff --git a/.forgejo/workflows/release.yml b/.forgejo/workflows/release.yml index a02a83f..1b5cf8a 100644 --- a/.forgejo/workflows/release.yml +++ b/.forgejo/workflows/release.yml @@ -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 }}"