Skip to content
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

Optionally publish packages definitely in the hackage workflow #2689

Merged
merged 2 commits into from
Feb 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions .github/workflows/hackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,14 @@ concurrency:
on:
workflow_dispatch:
inputs:
upload-candidates:
upload:
description: 'Whether packages should be uploaded'
required: true
default: 'false'
publish:
description: 'Wheter packages should be published as definitive'
required: true
default: 'false'
push:
branches:
- '*-hackage'
Expand All @@ -20,7 +24,7 @@ jobs:
check-and-upload-tarballs:
runs-on: ubuntu-latest
strategy:
fail-fast: ${{ github.event.inputs.upload-candidates != 'false' }}
fail-fast: ${{ github.event.inputs.upload != 'false' }}
matrix:
package: ["hie-compat", "hls-graph", "shake-bench",
"hls-plugin-api", "ghcide", "hls-test-utils",
Expand Down Expand Up @@ -138,8 +142,10 @@ jobs:
name: ${{ matrix.package }}
path: ${{ steps.generate-dist-tarball.outputs.path }}

upload-candidate:
if: github.event.inputs.upload-candidates != 'false'
upload-package:
# Runs triggered by *-hackage branches will upload packages
# cause inputs are blank when the workflow is not triggered manually
if: github.event.inputs.upload != 'false'
needs: check-and-upload-tarballs
runs-on: ubuntu-latest
steps:
Expand All @@ -156,4 +162,5 @@ jobs:
with:
hackageToken: ${{ secrets.HACKAGE_AUTH_TOKEN }}
packagesPath: packages
publish: false
# runs triggered by *-hackage branches will not publish packages definitely
publish: {{ github.event.inputs.publish == 'true' }}
2 changes: 1 addition & 1 deletion docs/contributing/releases.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ and it is being used in nix environments.
- [ ] create ${version}-hackage branch to trigger the hackage github workflow which will upload all changed packages to hackage as candidates
- [ ] for new plugins or packages, update hackage uploaders to add the author of the plugin/package and some hls maintainer(s) other than the owner of the hackage api key used to upload them (it has to be done by the owner of the api key, actually @pepeiborra)
- [ ] check manually candidates in hackage
- [ ] publish them definitely
- [ ] publish them definitely triggering a manual run of the hackage workflow setting the upload and publish inputs to `true`

### ghcup release

Expand Down