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

[Fix] fix actions #44

Merged
merged 2 commits into from
Feb 5, 2023
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
18 changes: 1 addition & 17 deletions .github/workflows/haskell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,7 @@ name: Haskell CI

on:
pull_request:
branches:
- main
- develop
push:
branches:
- main
- develop
branches: [main, develop]

permissions:
contents: read
Expand Down Expand Up @@ -44,13 +38,3 @@ jobs:
run: cabal build --enable-tests --enable-benchmarks all
- name: Run tests
run: cabal test all

- name: "Build & test"
run: |
cabal build glados;
find . -wholename "*glados/glados" -exec cp {} . \;;

- uses: actions/upload-artifact@v2
with:
name: glados
path: ./glados
39 changes: 35 additions & 4 deletions .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,44 @@
name: "pre-release"
name: "Automatic Release"

on:
workflow_run:
workflows: ["Haskell CI"]
types: [completed]
push:
branches: [main]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-haskell@v1
with:
ghc-version: "8.10.3"
cabal-version: "2.4"

- name: Cache
uses: actions/cache@v3
env:
cache-name: cache-cabal
with:
path: ~/.cabal
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/*.cabal') }}-${{ hashFiles('**/cabal.project') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-

- name: "Build & test"
run: |
cabal update
cabal build glados;
find . -wholename "*glados/glados" -exec cp {} . \;;

- uses: actions/upload-artifact@v2
with:
name: glados
path: ./glados

pre-release:
needs: build
name: "Pre Release"
runs-on: "ubuntu-latest"
steps:
Expand Down