Skip to content

Commit a2f2a40

Browse files
ulysses4evergeekosaur
authored andcommitted
CI: cabal-head prerelease: move to a current GitHub Action for prereleases
1 parent ba507b1 commit a2f2a40

File tree

1 file changed

+13
-45
lines changed

1 file changed

+13
-45
lines changed

.github/workflows/validate.yml

Lines changed: 13 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -451,6 +451,8 @@ jobs:
451451
name: Create a GitHub prerelease with the binary artifacts
452452
runs-on: ubuntu-latest
453453
if: github.ref == 'refs/heads/master'
454+
permissions:
455+
contents: write
454456

455457
# IMPORTANT! Any job added to the workflow should be added here too
456458
needs: [validate, validate-old-ghcs, build-alpine, dogfooding]
@@ -459,32 +461,15 @@ jobs:
459461
# for now this is hardcoded. is there a better way?
460462
- uses: actions/download-artifact@v4
461463
with:
462-
name: cabal-Windows-x86_64
463-
464-
- uses: actions/download-artifact@v4
465-
with:
466-
name: cabal-Linux-x86_64
467-
468-
- uses: actions/download-artifact@v4
469-
with:
470-
name: cabal-Linux-static-x86_64
471-
472-
- uses: actions/download-artifact@v4
473-
with:
474-
name: cabal-macOS-aarch64
464+
pattern: cabal-*
465+
path: binaries
475466

476467
- name: Create GitHub prerelease
477-
uses: marvinpinto/action-[email protected]
468+
uses: softprops/action-gh-release@v2
478469
with:
479-
repo_token: ${{ secrets.GITHUB_TOKEN }}
480-
automatic_release_tag: cabal-head
470+
tag_name: cabal-head
481471
prerelease: true
482-
title: cabal-head
483-
files: |
484-
cabal-head-Windows-x86_64.tar.gz
485-
cabal-head-Linux-x86_64.tar.gz
486-
cabal-head-Linux-static-x86_64.tar.gz
487-
cabal-head-macOS-aarch64.tar.gz
472+
files: binaries/cabal-*
488473

489474
prerelease-lts:
490475
name: Create a GitHub LTS prerelease with the binary artifacts
@@ -498,39 +483,22 @@ jobs:
498483
steps:
499484
- uses: actions/download-artifact@v4
500485
with:
501-
name: cabal-Windows-x86_64
502-
503-
- uses: actions/download-artifact@v4
504-
with:
505-
name: cabal-Linux-x86_64
506-
507-
- uses: actions/download-artifact@v4
508-
with:
509-
name: cabal-Linux-static-x86_64
510-
511-
- uses: actions/download-artifact@v4
512-
with:
513-
name: cabal-macOS-x86_64
486+
pattern: cabal-*
487+
path: binaries
514488

515489
- run: |
516490
# bash-ism, but we forced bash above
517491
mv cabal-{,lts-}head-Windows-x86_64.tar.gz
518492
mv cabal-{,lts-}head-Linux-x86_64.tar.gz
519493
mv cabal-{,lts-}head-Linux-static-x86_64.tar.gz
520-
mv cabal-{,lts-}head-macOS-x86_64.tar.gz
494+
mv cabal-{,lts-}head-macOS-aarch64.tar.gz
521495
522496
- name: Create GitHub prerelease
523-
uses: marvinpinto/action-[email protected]
497+
uses: softprops/action-gh-release@v2
524498
with:
525-
repo_token: ${{ secrets.GITHUB_TOKEN }}
526-
automatic_release_tag: cabal-lts-head
499+
tag_name: cabal-lts-head
527500
prerelease: true
528-
title: cabal-lts-head
529-
files: |
530-
cabal-lts-head-Windows-x86_64.tar.gz
531-
cabal-lts-head-Linux-x86_64.tar.gz
532-
cabal-lts-head-Linux-static-x86_64.tar.gz
533-
cabal-lts-head-macOS-x86_64.tar.gz
501+
files: binaries/cabal-*
534502

535503
# We use this job as a summary of the workflow
536504
# It will fail if any of the previous jobs does

0 commit comments

Comments
 (0)