Skip to content

Commit 3a6eed4

Browse files
committed
try something. first release
1 parent c2e0033 commit 3a6eed4

2 files changed

Lines changed: 57 additions & 33 deletions

File tree

.github/workflows/build.yml

Lines changed: 0 additions & 33 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Build Snapshot
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
contents: write
12+
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v4
16+
17+
- name: Setup Java
18+
uses: actions/setup-java@v4
19+
with:
20+
distribution: temurin
21+
java-version: 21
22+
cache: gradle
23+
24+
- name: Setup Gradle
25+
uses: gradle/actions/setup-gradle@v4
26+
27+
- name: Build plugin
28+
run: ./gradlew clean shadowJar
29+
30+
- name: Get commit message
31+
id: commit
32+
run: |
33+
echo "msg=$(git log -1 --pretty=%s)" >> $GITHUB_OUTPUT
34+
35+
- name: Rename jar with build number
36+
run: |
37+
JAR=$(ls build/libs/*.jar | head -n 1)
38+
NEW_NAME="ImageFrameMDE-1.0+build${{ github.run_number }}.jar"
39+
mv "$JAR" "build/libs/$NEW_NAME"
40+
41+
- name: Publish Snapshot Release
42+
uses: softprops/action-gh-release@v2
43+
with:
44+
tag_name: snapshot
45+
name: Latest Snapshot
46+
prerelease: true
47+
body: |
48+
Build: ${{ github.run_number }}
49+
50+
Commit:
51+
${{ steps.commit.outputs.msg }}
52+
53+
Commit URL:
54+
https://github.com/${{ github.repository }}/commit/${{ github.sha }}
55+
files: build/libs/*.jar
56+
env:
57+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)