Skip to content
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
55 changes: 55 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Publish

on:
workflow_dispatch:

jobs:
hackage:
name: Publish to Hackage
if: github.repository == 'aztecs-hs/aztecs'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y libgl1-mesa-dev libglu1-mesa-dev libx11-dev libxi-dev libxrandr-dev libxxf86vm-dev libxcursor-dev libxinerama-dev

- name: Setup Haskell
uses: haskell-actions/setup@v2
with:
ghc-version: "9.10.1"
cabal-version: "latest"

- name: Cache
uses: actions/cache@v4
with:
path: |
~/.cabal/store
dist-newstyle
key: ${{ runner.os }}-cabal-${{ hashFiles('**/*.cabal') }}
restore-keys: |
${{ runner.os }}-cabal-

- name: Build dependencies
run: cabal build --only-dependencies

- name: Create source distribution
run: cabal sdist

- name: Build Haddock documentation for Hackage
run: cabal haddock --haddock-for-hackage --enable-doc

- name: Publish to Hackage
env:
HACKAGE_TOKEN: ${{ secrets.HACKAGE_TOKEN }}
run: |
cabal upload --publish --token "$HACKAGE_TOKEN" dist-newstyle/sdist/*.tar.gz

- name: Upload documentation to Hackage
env:
HACKAGE_TOKEN: ${{ secrets.HACKAGE_TOKEN }}
run: |
cabal upload --publish --token "$HACKAGE_TOKEN" -d dist-newstyle/*-docs.tar.gz
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Aztecs

[![Discord](https://img.shields.io/discord/1306713440873877576.svg?label=&logo=discord&logoColor=ffffff&color=7389D8&labelColor=6A7EC2)](https://discord.gg/Hb7B3Qq4Xd)
[![License](https://img.shields.io/badge/license-BSD3-blue.svg)](https://github.com/aztecs-hs/aztecs/blob/main/LICENSE)
[![Package](https://img.shields.io/hackage/v/aztecs.svg)](https://hackage.haskell.org/package/aztecs)
[![CI status](https://github.com/aztecs-hs/aztecs/actions/workflows/ci.yml/badge.svg)](https://github.com/aztecs-hs/aztecs/actions)
Expand Down