-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (51 loc) · 1.53 KB
/
release.yml
File metadata and controls
60 lines (51 loc) · 1.53 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
51
52
53
54
55
56
57
58
59
60
name: Release
permissions:
contents: write
on:
push:
tags:
- v[0-9]+.*
jobs:
build:
name: Build binary file on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ macos-latest, windows-latest, ubuntu-latest ]
steps:
- uses: actions/checkout@v3
- uses: graalvm/setup-graalvm@v1
with:
java-version: '25'
distribution: 'graalvm'
github-token: ${{ secrets.GITHUB_TOKEN }}
cache: maven
- name: Build with Maven
run: mvn -B -Pnative -DskipTests package --file pom.xml
- name: Upload binary
uses: actions/upload-artifact@v4
with:
name: cooking-agent-${{ matrix.os }}
path: |
target/cooking-agent*
retention-days: 1
release:
name: "Release"
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
- name: Rename files
run: |
mkdir release-files
mv cooking-agent-windows-latest/cooking-agent.exe release-files/cooking-agent.exe
mv cooking-agent-macos-latest/cooking-agent release-files/cooking-agent-macos
mv cooking-agent-ubuntu-latest/cooking-agent release-files/cooking-agent-ubuntu
- name: Create a Github Release
uses: ncipollo/release-action@v1
with:
token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
body: ${{ github.ref_name }}
artifacts: "release-files/*"
generateReleaseNotes: true