-
Notifications
You must be signed in to change notification settings - Fork 1
67 lines (53 loc) · 2.19 KB
/
release.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
# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
# When a tag is pushed then also create a release,
# see https://github.com/softprops/action-gh-release
name: Create release
on:
push:
tags: "jmurmel-all*"
env:
JAVA_VERSION: 8
JAVA_TARGET: 8
permissions:
contents: read
jobs:
build:
permissions:
contents: write # for softprops/action-gh-release to create GitHub release
runs-on: ubuntu-latest
name: Release
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Set up JDK ${{ env.JAVA_VERSION }}
uses: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93 # v4.0.0
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: 'zulu'
- name: Restore Maven repo
uses: actions/cache/restore@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
- name: Build with Maven
run: mvn -V -B clean package -pl lambda,scripts -Dlaunch4j.skip=false -DskipTests=true -Djavac.target=${{ env.JAVA_TARGET }}
- name: Create Jar zipfile
run: zip -j ${{ github.ref_name }}-jar.zip LICENSE lambda/target/jmurmel.jar samples.mlib/mlib.lisp murmel-langref.md murmel-langref.html mlib.md mlib.html
- name: Create slim zipfile
run: zip -j ${{ github.ref_name }}-w64-slim.zip LICENSE scripts/target/jmurmel.exe samples.mlib/mlib.lisp murmel-langref.md murmel-langref.html mlib.md mlib.html && zip -r ${{ github.ref_name }}-w64-slim.zip legal/launch4j/
- name: Create release and upload files
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v1
with:
prerelease: true
files: |
CHANGES
GETTING STARTED.txt
LICENSE
lambda/target/jmurmel.jar
samples.mlib/mlib.lisp
mlib.md
mlib.html
murmel-langref.html
murmel-langref.md
${{ github.ref_name }}-jar.zip
${{ github.ref_name }}-w64-slim.zip