-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (42 loc) · 1.3 KB
/
release.yml
File metadata and controls
50 lines (42 loc) · 1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: Release
on:
push:
tags:
- 'v*'
jobs:
build-and-release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Temurin JDK 17
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '17'
- name: Install SWI-Prolog, GHC and cabal
run: |
sudo apt-get update
sudo apt-get install -y swi-prolog ghc cabal-install
- name: Install Haskell aeson library (for build)
run: |
cabal update
cabal install aeson --lib
- name: Build Haskell scheduler binary
run: |
ghc -O2 -threaded haskell/GeneticSchedule.hs -o genetic-schedule
- name: Package artifact
run: |
mkdir -p dist
cp genetic-schedule dist/
cp -r prolog dist/prolog
cp sample-request.json dist/
echo "Build timestamp: $(date -u +%Y-%m-%dT%H:%M:%SZ)" > dist/BUILD_INFO.txt
tar -czf genetic-scheduler-${{ github.ref_name }}.tar.gz -C dist .
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
files: |
genetic-scheduler-${{ github.ref_name }}.tar.gz
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}