You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A GitHub action for publishing packages and documentation to Hackage
3
4
4
-
## Usage Examples
5
+
## Inputs
6
+
7
+
*`hackageToken` (required): An auth token from Hackage, which can be generated at `https://hackage.haskell.org/user/$USERNAME/manage`
8
+
9
+
*`candidate` (optional): Whether to upload as a package candidate or not.
10
+
* Defaults to `true` because Hackage uploads are permanent, and it's usually not a good idea to do irreversible actions in an automatic pipeline. But if you absolutely want to skip the candidate step, set this to `false`.
11
+
12
+
*`packagesPath` (optional): The path that contains package tarballs (defaults to `dist-newstyle/sdist/`)
13
+
14
+
*`docsPath` (optional): The path that contains packages' documentation tarballs.
15
+
* If not set, does not upload documentation separately
16
+
17
+
*`hackageServer` (optional): The URL of the Hackage server to upload to (e.g. for self-hosted Hackage instances)
5
18
6
-
This step publishes packages and documentation as candidates on Hackage using the specified authentication token. You can generate an authentication token on [your Hackage account managment page](http://hackage.haskell.org/users/account-management).
19
+
## Outputs
20
+
21
+
N/A
22
+
23
+
## Example
7
24
8
25
```yaml
9
26
- uses: haskell-actions/hackage-publish@v1
10
27
with:
11
28
hackageToken: ${{ secrets.HACKAGE_AUTH_TOKEN }}
12
-
packagesPath: ${{ runner.temp }}/packages
13
-
docsPath: ${{ runner.temp }}/docs
14
-
publish: false
15
29
```
16
30
17
-
`docsPath` parameter is optional and the action will not try uploading documentation when it is not specified.
18
-
When `docsPath` is specified, but doesn't contain documentation for one or many packages in `packagePath`,
19
-
these packages are uploaded without documentation. Missing documentation never results into an execution error.
20
-
21
-
To publish to a custom/private Hackage, specify `hackageServer` parameter to the custom/private Hackage server URI
22
-
31
+
One particularly useful workflow is to be able to use the hackage token associated with the GitHub user running the workflow. This allows multiple maintainers to use their own tokens and not have to share one user's token.
0 commit comments