-
Notifications
You must be signed in to change notification settings - Fork 111
Add automated release workflow #559
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Add automated release workflow #559
Conversation
| - name: Upload to Hackage | ||
| run: cabal upload --publish hedgehog-${GITHUB_REF_NAME}.tar.gz | ||
| env: | ||
| HACKAGE_TOKEN: ${{ secrets.HACKAGE_TOKEN }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can generate and add one. Before we do that, we need to make sure that the Actions permissions are set to the minimal needed for each workflow/job, to avoid hijacking.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. I recommend this action to at least require an approval from a GitHub account with write access.
|
Thank you @BowTiedRadone! We can simplify the workflow by using cabal sdist, and speed up the checkout by doing a shallow clone (fetch-depth: 1). |
Addresses hedgehogqa#559 (comment).
Addresses hedgehogqa#559 (comment).
Co-authored-by: Nikos Baxevanis <[email protected]>
|
I think the last discussion item for this PR is the fact that it uses |
Yes, that's a good point 👍 |
moodmosaic
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Co-authored-by: Nikos Baxevanis <[email protected]>
|
@BowTiedRadone, what would be the easiest way to test this? |
|
@moodmosaic The easiest would be cutting a test tag (since the workflow does not publish anyway). The other way would be to use https://github.com/nektos/act for local debugging. For the second, I can share the steps if needed. |
This PR adds a GitHub Actions workflow to automate the release process for the Hedgehog library. Key features:
GHCandcabal-installviaGHCup.cabal sdistto generate the tarball matching maintainer/Hackage requirements.cabal checkbefore upload.HACKAGE_TOKEN).Notes
The workflow expects a valid
HACKAGE_TOKENsecret to be set in the repository for Hackage uploads. The tarball creation logic is designed to match the official Hackage release process as closely as possible.Considerations
The new workflow's output was tested locally using
actand diff-checked agains the latest official Hackage release. This PR should be merged after one of the maintainers can confirm theHACKAGE_TOKENsecret addition.