diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f3e0cf4..2278dea 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,15 +8,7 @@ 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: @@ -31,14 +23,9 @@ 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: @@ -151,7 +138,6 @@ 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)" @@ -173,7 +159,7 @@ jobs: needs: [build, check] runs-on: ubuntu-latest - if: startsWith(github.ref, 'refs/tags/v') + if: ${{ needs.check.outputs.tag != '' }} outputs: upload_url: ${{ steps.create_release.outputs.upload_url }} @@ -239,7 +225,7 @@ jobs: runs-on: ${{ matrix.os }} - if: startsWith(github.ref, 'refs/tags/v') + if: ${{ needs.check.outputs.tag != '' }} strategy: fail-fast: false