Skip to content

Commit 5224115

Browse files
committed
Build cleanup and workflow changes
1 parent 45ddcad commit 5224115

9 files changed

Lines changed: 184 additions & 281 deletions

File tree

.github/workflows/build.yml

Lines changed: 0 additions & 36 deletions
This file was deleted.
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Nightly Build
2+
3+
on:
4+
pull_request:
5+
branches: [ master, main, develop ]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Checkout Repository
13+
uses: actions/checkout@v4
14+
15+
- name: Get short commit hash
16+
id: vars
17+
run: echo "COMMIT_HASH=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
18+
19+
- name: Set-Up JDK
20+
uses: actions/setup-java@v4
21+
with:
22+
distribution: 'oracle'
23+
java-version: '21'
24+
architecture: x64
25+
cache: 'gradle'
26+
27+
- name: Read Gradle Properties
28+
uses: BrycensRanch/read-properties-action@v1.0.4
29+
id: all
30+
with:
31+
file: gradle.properties
32+
all: true
33+
34+
- name: Publish snapshot to maven
35+
id: upload-maven
36+
run: ./gradlew publish -PmavenType=snapshots -PmavenUsername=${{ secrets.MAVEN_USER }} -PmavenPassword=${{ secrets.MAVEN_TOKEN }}
37+
38+
- name: Rename jar
39+
run: mv build/libs/${{ steps.all.outputs.modId }}-${{ steps.all.outputs.modVersion }}.jar build/libs/${{ steps.all.outputs.modId }}-${{ steps.all.outputs.modVersion }}-${{ env.COMMIT_HASH }}.jar
40+
41+
- name: Upload build artifacts
42+
uses: actions/upload-artifact@v4
43+
with:
44+
name: lambda-loader-nightly
45+
path: build/libs/${{ steps.all.outputs.modId }}-${{ steps.all.outputs.modVersion }}-${{ env.COMMIT_HASH }}.jar
46+
if-no-files-found: error

.github/workflows/publish.yml

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

.github/workflows/release.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Release Lambda Loader
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
8+
jobs:
9+
publish:
10+
name: Build and release lambda-loader
11+
runs-on: ubuntu-latest
12+
13+
permissions:
14+
contents: write
15+
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v4
19+
20+
- name: Set-Up JDK
21+
uses: actions/setup-java@v4
22+
with:
23+
distribution: 'oracle'
24+
java-version: '21'
25+
architecture: x64
26+
cache: 'gradle'
27+
28+
- name: Read Gradle Properties
29+
uses: BrycensRanch/read-properties-action@v1.0.4
30+
id: all
31+
with:
32+
file: gradle.properties
33+
all: true
34+
35+
- name: Publish snapshot to maven
36+
id: upload-maven
37+
run: ./gradlew publish -PmavenType=release -PmavenUsername=${{ secrets.MAVEN_USER }} -PmavenPassword=${{ secrets.MAVEN_TOKEN }}
38+
39+
- name: Create release
40+
uses: softprops/action-gh-release@v2.0.8
41+
with:
42+
name: Lambda Loader ${{ github.ref_name }}
43+
tag_name: ${{ github.ref_name }}
44+
generate_release_notes: true
45+
append_body: true
46+
make_latest: "true"
47+
files: build/libs/${{ steps.all.outputs.modId }}-${{ steps.all.outputs.modVersion }}.jar

0 commit comments

Comments
 (0)