-
Notifications
You must be signed in to change notification settings - Fork 6
43 lines (36 loc) · 1.11 KB
/
hackage.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: "Release"
on:
push:
paths:
- ".github/workflows/hackage.yml"
release:
types:
- released
- prereleased
jobs:
publish-to-hackage:
name: "Publish to Hackage"
runs-on: ubuntu-latest
steps:
- name: "Clone repository"
uses: actions/checkout@v4
- name: "Install Stack"
uses: haskell-actions/setup@v2
id: install-haskell
with:
stack-no-global: true
enable-stack: true
stack-version: "latest"
- name: Configure stack
run: |
echo ${{ github.event.action }}
mkdir -p ${{ steps.install-haskell.outputs.stack-root }}
echo "save-hackage-creds: false" >> ${{ steps.install-haskell.outputs.stack-root }}/config.yaml
- name: Check source distribution
run: stack sdist .
- name: Publish `wai-saml2`
if: startsWith(github.ref, 'refs/tags/wai-saml2-') && github.event.action == 'released'
run: stack upload . --candidate
env:
HACKAGE_USERNAME: ${{ secrets.HACKAGE_USER }}
HACKAGE_PASSWORD: ${{ secrets.HACKAGE_PASSWORD }}