Skip to content

dist-newstyle is needed afterall #7

dist-newstyle is needed afterall

dist-newstyle is needed afterall #7

Workflow file for this run

name: Linux CI
on:
push:
tags:
- "v*.*.*"
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
ghc: ["9.8.2"]
cabal: ["3.10.3.0"]
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Setup Haskell
uses: haskell/actions/setup@v1
id: setup-haskell-cabal
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: ${{ matrix.cabal }}
- name: Freeze
run: |
cabal freeze
- name: Cache cabal
uses: actions/cache@v2
id: cache-cabal
with:
path: "~/.cabal"
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('/home/runner/work/zwirn-loom/zwirn-loom/app') }}-1
- name: Cache dist
uses: actions/cache@v2
id: cache-bin
with:
path: "/dist-newstyle/"
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('/home/runner/work/zwirn-loom/zwirn-loom/app') }}-2
- name: cabal update and build
run: |
cabal update
cabal v2-build --enable-tests
- name: make directory
run: mkdir build
- name: move static
run: cp -r static build/static
- name: move executable
run: cp -r dist-newstyle/build/x86_64-linux/ghc-${{ matrix.ghc }}/zwirn-loom-0.1.0/x/zwirn-loom/build/zwirn-loom/zwirn-loom build/zwirn-loom
- name: setup node
uses: actions/setup-node@v3
with:
node-version: 16
- name: electron forge
run: |
npm install --save-dev @electron-forge/cli
npx electron-forge import
npm run make
- name: Release
uses: softprops/action-gh-release@v1
with:
files: |
out/make/deb/x64/*.deb
out/make/rpm/x64/*.rpm