fix #2: normalize path separator #26
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: | |
workflow_dispatch: | |
pull_request: | |
types: [synchronize, opened, reopened] | |
push: | |
branches: [master] | |
jobs: | |
stack: | |
name: stack / ${{ matrix.os }} / ghc ${{ matrix.ghc }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macOS-latest, windows-latest] | |
stack: ["2.9.3"] | |
ghc: ["9.2.7"] | |
include: | |
- os: ubuntu-latest | |
executable: nekofs-linux-x86_64 | |
- os: macOS-latest | |
executable: nekofs-macos-x86_64 | |
- os: windows-latest | |
executable: nekofs-windows.exe | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: haskell/actions/setup@v2 | |
name: Setup Haskell Stack | |
with: | |
ghc-version: ${{ matrix.ghc }} | |
stack-version: ${{ matrix.stack }} | |
- uses: actions/cache@v3 | |
name: Cache dependencies (Unix) | |
if: matrix.os != 'windows-latest' | |
with: | |
path: ~/.stack | |
key: ${{ runner.os }}-${{ matrix.ghc }}-stack | |
- uses: actions/cache@v3 | |
name: Cache dependencies (Windows) | |
if: matrix.os == 'windows-latest' | |
with: | |
path: | | |
~\AppData\Roaming\stack | |
~\AppData\Local\Programs\stack | |
key: ${{ runner.os }}-${{ matrix.ghc }}-stack | |
- name: Install dependencies | |
run: | | |
stack build --system-ghc --test --bench --no-run-tests --no-run-benchmarks --only-dependencies | |
- name: Build | |
run: | | |
stack build --system-ghc --test --bench --no-run-tests --no-run-benchmarks | |
- name: Test | |
run: | | |
stack test --system-ghc | |
- name: Package | |
run: | | |
stack install --system-ghc nekofs --local-bin-path=package | |
mv package/nekofs* ${{ matrix.executable }} | |
- name: Set release tag (Unix) | |
if: matrix.os != 'windows-latest' | |
run: echo "RELEASE_TAG=v$(stack --system-ghc query locals nekofs version)" >> $GITHUB_ENV | |
- name: Set release tag (Windows) | |
if: matrix.os == 'windows-latest' | |
run: echo "RELEASE_TAG=v$(stack --system-ghc query locals nekofs version)" >> $env:GITHUB_ENV | |
- name: Extract release notes | |
id: get_changelog | |
uses: ffurrer2/extract-release-notes@v1 | |
- name: Update Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
tag_name: ${{ env.RELEASE_TAG }} | |
files: ${{ matrix.executable }} | |
body: ${{ steps.get_changelog.outputs.release_notes }} | |