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

41 create an automatic release action #42

Merged
merged 7 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
74 changes: 46 additions & 28 deletions .github/workflows/haskell.yml
Original file line number Diff line number Diff line change
@@ -1,38 +1,56 @@
name: Haskell CI

on: pull_request
on:
pull_request:
branches:
- main
- develop
push:
branches:
- main
- develop

permissions:
contents: read

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: Install dependencies
run: |
cabal update
cabal build --only-dependencies --enable-tests --enable-benchmarks
- name: Build
run: cabal build --enable-tests --enable-benchmarks all
- name: Run tests
run: cabal test all
- 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: Install dependencies
run: |
cabal update
cabal build --only-dependencies --enable-tests --enable-benchmarks
- name: Build
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
25 changes: 25 additions & 0 deletions .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: "pre-release"

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

jobs:
pre-release:
name: "Pre Release"
runs-on: "ubuntu-latest"
steps:
- uses: actions/download-artifact@v2
with:
name: glados

- uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.TOKEN }}"
automatic_release_tag: "latest"
prerelease: true
title: "Development Build"
files: |
./glados
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,6 @@ cabal.project.local~
.HTF/
.ghc.environment.*
*.tix
glados
tmp
packagedb
packagedb
5 changes: 0 additions & 5 deletions CHANGELOG.md

This file was deleted.

4 changes: 0 additions & 4 deletions cabal.project

This file was deleted.