-
Notifications
You must be signed in to change notification settings - Fork 0
88 lines (72 loc) · 2.14 KB
/
workflow.yml
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
name: Gwydion CI/CD
on:
push:
branches:
- '**'
pull_request:
branches:
- '**'
release:
types: [created]
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: '21'
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Build with Gradle
run: ./gradlew build
- name: Build Jester
run: |
cd jester
cargo build --release
- name: Upload JVM module artifacts
uses: actions/upload-artifact@v3
with:
name: jvm-modules
path: |
*/build/libs/*-jvm.jar
!compiler/build/libs/*-jvm.jar
- name: Rename and upload compiler artifacts
run: |
mkdir -p artifacts
cp compiler/build/libs/gwydion.jar artifacts/gwydion-compiler-jvm.jar
cp compiler/build/bin/linuxX64/releaseExecutable/compiler.kexe artifacts/gwydion-compiler-linuxX64
cp compiler/build/bin/windowsX64/releaseExecutable/compiler.exe artifacts/gwydion-compiler-windowsX64.exe
- uses: actions/upload-artifact@v3
with:
name: compiler-artifacts
path: artifacts/*
- name: Upload Jester artifact
uses: actions/upload-artifact@v3
with:
name: jester
path: jester/target/release/jester
release:
needs: build
runs-on: ubuntu-latest
if: github.event_name == 'release' && github.event.action == 'created'
steps:
- uses: actions/checkout@v3
- name: Download all artifacts
uses: actions/download-artifact@v3
- name: Display structure of downloaded files
run: ls -R
- name: Upload Release Assets
uses: softprops/action-gh-release@v1
with:
files: |
compiler-artifacts/gwydion-compiler-jvm.jar
compiler-artifacts/gwydion-compiler-linuxX64
compiler-artifacts/gwydion-compiler-windowsX64.exe
jester/jester
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}