Skip to content

Commit

Permalink
Add Hackage workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
mbg committed Mar 21, 2022
1 parent 8a7f764 commit 0e6b41b
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/hackage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: hackage

on:
push:
tags:
- 'c14n-*'

jobs:
publish-to-hackage:
name: 'Publish to Hackage'
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- uses: haskell/actions/setup@v1
id: install-haskell
with:
stack-no-global: true
enable-stack: true
stack-version: 'latest'

- name: Configure stack
run: |
mkdir -p ${{ steps.install-haskell.outputs.stack-root }}
echo "save-hackage-creds: false" >> ${{ steps.install-haskell.outputs.stack-root }}/config.yaml
- name: Publish `c14n`
if: startsWith(github.ref, 'refs/tags/c14n-')
run: stack upload .
env:
HACKAGE_USERNAME: ${{ secrets.HACKAGE_USER }}
HACKAGE_PASSWORD: ${{ secrets.HACKAGE_PASSWORD }}

0 comments on commit 0e6b41b

Please sign in to comment.