From e52173cb9d97a1f264c9eb0bdfef2d2d7c923e23 Mon Sep 17 00:00:00 2001 From: John Ky Date: Wed, 22 Jan 2025 17:59:10 +1100 Subject: [PATCH] Revert "stuff" This reverts commit dfa2d7f9846c1fdca78648634481b11731df5ded. --- .github/workflows/ci.yml | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2278dea..f3e0cf4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,7 +8,15 @@ on: push: branches: - main + tags: + - 'v*' pull_request: + workflow_dispatch: + inputs: + ref: + description: "The commit, branch, or tag to build" + required: true + default: "main" jobs: build: @@ -23,9 +31,14 @@ jobs: - ghc: "9.6.6" os: macOS-latest + permissions: + contents: write + steps: - uses: actions/checkout@v4 - + with: + ref: ${{ github.event.inputs.ref }} # Checkout the specified branch, tag, or commit + - uses: haskell-actions/setup@v2 id: setup-haskell with: @@ -138,6 +151,7 @@ jobs: server: http://hackage.haskell.org username: ${{ secrets.HACKAGE_USER }} password: ${{ secrets.HACKAGE_PASS }} + GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} run: | package_version="$(cat *.cabal | grep '^version:' | cut -d : -f 2 | xargs)" @@ -159,7 +173,7 @@ jobs: needs: [build, check] runs-on: ubuntu-latest - if: ${{ needs.check.outputs.tag != '' }} + if: startsWith(github.ref, 'refs/tags/v') outputs: upload_url: ${{ steps.create_release.outputs.upload_url }} @@ -225,7 +239,7 @@ jobs: runs-on: ${{ matrix.os }} - if: ${{ needs.check.outputs.tag != '' }} + if: startsWith(github.ref, 'refs/tags/v') strategy: fail-fast: false