From 8995efce15f1688452b06ce72fd8941304ac7f83 Mon Sep 17 00:00:00 2001 From: James Eversole Date: Thu, 23 Jan 2025 16:07:49 -0600 Subject: [PATCH] Release 0.6.0 --- .gitea/workflows/test-and-build.yml | 46 ++++++++++++++--------------- tricu.cabal | 2 +- 2 files changed, 23 insertions(+), 25 deletions(-) diff --git a/.gitea/workflows/test-and-build.yml b/.gitea/workflows/test-and-build.yml index d5e0557..7ee9c03 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: +on: push: - branches: - - main - pull_request: - types: - - opened - - synchronize + tags: + - '*' jobs: test: @@ -17,8 +13,9 @@ jobs: username: ${{ secrets.REGISTRY_USERNAME }} password: ${{ secrets.REGISTRY_PASSWORD }} steps: - - name: Checkout code - uses: actions/checkout@v3 + - uses: actions/checkout@v3 + with: + fetch-depth: 0 - name: Set up cache for Cabal uses: actions/cache@v4 @@ -57,19 +54,9 @@ jobs: username: ${{ secrets.REGISTRY_USERNAME }} password: ${{ secrets.REGISTRY_PASSWORD }} steps: - - name: Checkout code - uses: actions/checkout@v3 - - - name: Set up cache for Cabal - uses: actions/cache@v4 + - uses: actions/checkout@v3 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 @@ -80,9 +67,20 @@ jobs: key: nix-${{ hashFiles('flake.lock') }} restore-keys: | nix- - + - name: Build binary run: | nix build ls -alh ./result/bin/tricu - + + - name: Setup go for release actoin + uses: actions/setup-go@v5 + with: + go-version: '>=1.20.1' + + - name: Release binary + uses: https://gitea.com/actions/release-action@main + with: + files: |- + ./result/bin/tricu + api_key: '${{ secrets.RELEASE_TOKEN }}' diff --git a/tricu.cabal b/tricu.cabal index 76ee20d..bc340f8 100644 --- a/tricu.cabal +++ b/tricu.cabal @@ -1,7 +1,7 @@ cabal-version: 1.12 name: tricu -version: 0.6.0 +version: 0.7.0 description: A micro-language for exploring Tree Calculus author: James Eversole maintainer: james@eversole.co