diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 2d8be7f02a3..863f9bfc853 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -404,6 +404,8 @@ jobs: name: Create a GitHub prerelease with the binary artifacts runs-on: ubuntu-latest if: github.ref == 'refs/heads/master' + permissions: + contents: write # IMPORTANT! Any job added to the workflow should be added here too needs: [validate, validate-old-ghcs, build-alpine, dogfooding] @@ -411,6 +413,7 @@ jobs: steps: - uses: actions/download-artifact@v4 with: +<<<<<<< HEAD name: cabal-Windows-x86_64 - uses: actions/download-artifact@v4 @@ -424,19 +427,55 @@ jobs: - uses: actions/download-artifact@v4 with: name: cabal-macOS-x86_64 +======= + pattern: cabal-* + path: binaries +>>>>>>> db234dde9 (CI: cabal-head prerelease: move to a current GitHub Action for prereleases) - name: Create GitHub prerelease - uses: marvinpinto/action-automatic-releases@v1.2.1 + uses: softprops/action-gh-release@v2 with: - repo_token: ${{ secrets.GITHUB_TOKEN }} - automatic_release_tag: cabal-head + tag_name: cabal-head prerelease: true +<<<<<<< HEAD title: cabal-head files: | cabal-head-Windows-x86_64.tar.gz cabal-head-Linux-x86_64.tar.gz cabal-head-Linux-static-x86_64.tar.gz cabal-head-macOS-x86_64.tar.gz +======= + files: binaries/cabal-* + + prerelease-lts: + name: Create a GitHub LTS prerelease with the binary artifacts + runs-on: ubuntu-latest + # The LTS branch is hardcoded for now, update it on a new LTS! + if: github.ref == 'refs/heads/3.12' + + # IMPORTANT! Any job added to the workflow should be added here too + needs: [validate, validate-old-ghcs, build-alpine, dogfooding] + + steps: + - uses: actions/download-artifact@v4 + with: + pattern: cabal-* + path: binaries + + - run: | + # bash-ism, but we forced bash above + mv cabal-{,lts-}head-Windows-x86_64.tar.gz + mv cabal-{,lts-}head-Linux-x86_64.tar.gz + mv cabal-{,lts-}head-Linux-static-x86_64.tar.gz + mv cabal-{,lts-}head-macOS-aarch64.tar.gz + + - name: Create GitHub prerelease + uses: softprops/action-gh-release@v2 + with: + tag_name: cabal-lts-head + prerelease: true + files: binaries/cabal-* +>>>>>>> db234dde9 (CI: cabal-head prerelease: move to a current GitHub Action for prereleases) # We use this job as a summary of the workflow # It will fail if any of the previous jobs does