Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI housekeeping #55

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
25 changes: 17 additions & 8 deletions .github/workflows/haskell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@ jobs:
matrix:
ghc: ["9.10.1", "9.8.2", "9.6.6"]
os: [ubuntu-latest, macOS-latest, windows-latest]
# exclude:
# - ghc: "9.4.2"
# os: windows-latest

env:
# Modify this value to "invalidate" the cabal cache.
CABAL_CACHE_VERSION: "avro/2024-08-05"

steps:
- uses: actions/checkout@v2
Expand All @@ -30,7 +31,7 @@ jobs:
id: setup-haskell
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: 3.12.1.0
cabal-version: 3.10.3.0

- name: Set some window specific things
if: matrix.os == 'windows-latest'
Expand All @@ -51,7 +52,7 @@ jobs:
dist-dir: dist-newstyle
store-path: ${{ steps.setup-haskell.outputs.cabal-store }}
threads: 16
archive-uri: ${{ secrets.BINARY_CACHE_URI }}/${{ env.CABAL_CACHE_VERSION }}/${{ runner.os }}/${{ matrix.cabal }}/${{ matrix.ghc }}
archive-uri: ${{ secrets.BINARY_CACHE_URI }}/${{ env.CABAL_CACHE_VERSION }}/${{ runner.os }}
skip: "${{ secrets.BINARY_CACHE_URI == '' }}"

- name: Cabal cache over HTTPS
Expand All @@ -60,7 +61,7 @@ jobs:
dist-dir: dist-newstyle
store-path: ${{ steps.setup-haskell.outputs.cabal-store }}
threads: 16
archive-uri: https://cache.haskellworks.io/${{ env.CABAL_CACHE_VERSION }}/${{ runner.os }}/${{ matrix.cabal }}/${{ matrix.ghc }}
archive-uri: https://cache.haskellworks.io/${{ env.CABAL_CACHE_VERSION }}/${{ runner.os }}
skip: "${{ secrets.BINARY_CACHE_URI != '' }}"

- name: Build
Expand Down Expand Up @@ -122,14 +123,14 @@ jobs:
cd $PROJECT_DIR && cd `dirname $i`
cabal v2-sdist -o $PROJECT_DIR/build/sdist
done;

- name: Publish to hackage
env:
server: http://hackage.haskell.org
username: ${{ secrets.HACKAGE_USER }}
password: ${{ secrets.HACKAGE_PASS }}
candidate: false
run: |
package_version="$(cat *.cabal | grep '^version:' | cut -d : -f 2 | xargs)"
for PACKAGE_TARBALL in $(find ./build/sdist/ -name "*.tar.gz"); do
PACKAGE_NAME=$(basename ${PACKAGE_TARBALL%.*.*})
if ${{ env.candidate }}; then
Expand All @@ -149,6 +150,14 @@ jobs:
fi
done

- name: "Build Changelog"
id: build_changelog
uses: mikepenz/release-changelog-builder-action@v3
env:
GITHUB_TOKEN: ${{ github.token }}
with:
toTag: "{{ github.ref }}"

- name: Create Release
id: create_release
uses: actions/create-release@v1
Expand All @@ -157,6 +166,6 @@ jobs:
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ needs.check.outputs.tag }}
body: Undocumented
body: ${{ steps.build_changelog.outputs.changelog }}
draft: false
prerelease: false
Loading