This repository has been archived by the owner on Jan 12, 2025. It is now read-only.
Update to latest stackage and cabal. #105
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: [push] | |
jobs: | |
build: | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: 'Check formatting' | |
uses: mrkkrp/ormolu-action@v15 | |
- uses: actions/cache@v4 | |
with: | |
key: stack | |
path: ~/.stack | |
- run: sudo apt-get update && sudo apt-get install --assume-yes libsdl2-dev libglew-dev libspa-0.2-dev libpipewire-0.3-dev | |
- uses: haskell-actions/setup@v2 | |
with: | |
stack-setup-ghc: true | |
enable-stack: true | |
- name: 'Check cabal version' | |
run: cabal --version | |
- name: 'Check package metadata' | |
run: cabal check | |
- name: 'Build and Test' | |
run: stack test | |
- name: 'Generate Package' | |
run: stack sdist | |
- name: 'Archive Package' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: package | |
path: .stack-work/dist/*/*/monomer-flatpak-example-*.tar.gz | |
if-no-files-found: error | |
publish: | |
needs: [build] | |
runs-on: ubuntu-24.04 | |
environment: | |
name: hackage | |
url: https://hackage.haskell.org/package/monomer-flatpak-example | |
steps: | |
- uses: actions/download-artifact@v3 | |
with: | |
name: package | |
- name: 'Check cabal version' | |
run: cabal --version | |
- name: 'Publish Package to Hackage' | |
run: cabal upload --publish -u "$HACKAGE_USERNAME" -p "$HACKAGE_PASSWORD" */*/*.tar.gz | |
env: | |
HACKAGE_USERNAME: ${{ secrets.HACKAGE_USERNAME }} | |
HACKAGE_PASSWORD: ${{ secrets.HACKAGE_PASSWORD }} |