Skip to content

Commit e095741

Browse files
committed
update actions
1 parent b3019e8 commit e095741

File tree

2 files changed

+63
-0
lines changed

2 files changed

+63
-0
lines changed

.github/workflows/release.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: Release
2+
3+
permissions:
4+
contents: write
5+
6+
on:
7+
push:
8+
tags:
9+
- v[0-9]+.*
10+
11+
jobs:
12+
build:
13+
name: Build binary file on ${{ matrix.os }}
14+
runs-on: ${{ matrix.os }}
15+
strategy:
16+
matrix:
17+
os: [ macos-latest, windows-latest, ubuntu-latest ]
18+
19+
steps:
20+
- uses: actions/checkout@v3
21+
22+
- uses: graalvm/setup-graalvm@v1
23+
with:
24+
java-version: '21'
25+
distribution: 'graalvm-community'
26+
components: 'native-image'
27+
github-token: ${{ secrets.GITHUB_TOKEN }}
28+
cache: maven
29+
30+
- name: Build with Maven
31+
run: mvn -B -Pnative -DskipTests package --file pom.xml
32+
33+
- name: Upload binary
34+
uses: actions/upload-artifact@v3
35+
with:
36+
name: cooking-agent-${{ matrix.os }}
37+
path: |
38+
target/cooking-agent*
39+
retention-days: 1
40+
release:
41+
name: "Release"
42+
needs: build
43+
runs-on: ubuntu-latest
44+
steps:
45+
- uses: actions/download-artifact@v2
46+
47+
- name: Rename files
48+
run: |
49+
mkdir release-files
50+
mv cooking-agent-windows-latest/cooking-agent.exe release-files/cooking-agent.exe
51+
mv cooking-agent-macos-latest/cooking-agent release-files/cooking-agent-macos
52+
mv cooking-agent-ubuntu-latest/cooking-agent release-files/cooking-agent-ubuntu
53+
54+
- name: Create a Github Release
55+
uses: ncipollo/release-action@v1
56+
with:
57+
token: "${{ secrets.GITHUB_TOKEN }}"
58+
prerelease: false
59+
body: ${{ github.ref_name }}
60+
artifacts: "release-files/*"
61+
generateReleaseNotes: true

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Simple AI Agent
22

3+
[![Maven build](https://github.com/JavaAIDev/simple-ai-agent/actions/workflows/maven.yml/badge.svg)](https://github.com/JavaAIDev/simple-ai-agent/actions/workflows/maven.yml)
4+
35
A simple AI agent built using Spring AI.
46

57
Native executable of this agent is built using GraalVM.

0 commit comments

Comments
 (0)