From 2bbcc2e6be872da4a559eed27d91b951179587d5 Mon Sep 17 00:00:00 2001 From: James Eversole Date: Thu, 23 Jan 2025 16:07:49 -0600 Subject: [PATCH] Attempt to release --- .gitea/workflows/test-and-build.yml | 34 ++++++++++++++--------------- 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/.gitea/workflows/test-and-build.yml b/.gitea/workflows/test-and-build.yml index d5e0557..d18b2c7 100644 --- a/.gitea/workflows/test-and-build.yml +++ b/.gitea/workflows/test-and-build.yml @@ -1,13 +1,9 @@ -name: Test and Build +name: Test, Build, and Release on: push: branches: - main - pull_request: - types: - - opened - - synchronize jobs: test: @@ -19,6 +15,8 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v3 + with: + fetch-depth: 0 - name: Set up cache for Cabal uses: actions/cache@v4 @@ -59,18 +57,9 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v3 - - - name: Set up cache for Cabal - uses: actions/cache@v4 with: - path: | - ~/.cache/cabal - ~/.config/cabal - ~/.local/state/cabal - key: cabal-${{ hashFiles('tricu.cabal') }} - restore-keys: | - cabal- - + fetch-depth: 0 + - name: Set up cache for Nix uses: actions/cache@v4 with: @@ -80,9 +69,18 @@ jobs: key: nix-${{ hashFiles('flake.lock') }} restore-keys: | nix- - + - name: Build binary run: | nix build ls -alh ./result/bin/tricu - + + - name: Release binary + uses: https://gitea.com/actions/release-action@main + with: + files: |- + ./result/bin/tricu + api_key: '${{ secrets.RELEASE_TOKEN }}' + tag: $(git rev-parse --short HEAD) + title: "Release $(git rev-parse --short HEAD)" + note: "Automated release for commit $(git rev-parse --short HEAD)"