-
Notifications
You must be signed in to change notification settings - Fork 23
59 lines (48 loc) · 1.83 KB
/
build.yml
File metadata and controls
59 lines (48 loc) · 1.83 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
name: Build Lambda
on:
push:
branches:
- '1.**'
pull_request:
jobs:
build:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
name: Build Lambda
runs-on: ubuntu-latest
permissions:
contents: write
env:
SEGMENT_DOWNLOAD_TIMEOUT_MINS: '5'
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set-Up JDK
uses: actions/setup-java@v4
with:
distribution: 'oracle'
java-version: '21'
architecture: x64
cache: 'gradle'
- name: Read Gradle Properties
uses: BrycensRanch/read-properties-action@v1.0.4
id: all
with:
file: gradle.properties
all: true
- name: Publish snapshot to maven
run: ./gradlew publish -PmavenType=snapshots -PcommitHash=SNAPSHOT -PmavenUsername=${{ secrets.MAVEN_USER }} -PmavenPassword=${{ secrets.MAVEN_TOKEN }}
- name: Generate Summary
if: steps.upload.conclusion == 'success'
run: |
cat << EOF >> $GITHUB_STEP_SUMMARY
### [Lambda ${{ steps.all.outputs.modVersion }} ${{ steps.all.outputs.minecraftVersion }} (${{ env.COMMIT_HASH }})](https://maven.lambda-client.org/snapshots/com/lambda/lambda/${{ steps.all.outputs.modVersion }}+${{ steps.all.outputs.minecraftVersion }}-${{ env.COMMIT_HASH }}/lambda-${{ steps.all.outputs.modVersion }}+${{ steps.all.outputs.minecraftVersion }}-${{ env.COMMIT_HASH }}.jar)
EOF
- name: Failover Upload
if: steps.upload.conclusion == 'failure'
uses: actions/upload-artifact@v4
with:
name: lambda-nightly
path: |
/build/libs/lambda-*-${{ steps.all.outputs.modVersion }}+${{ steps.all.outputs.minecraftVersion }}-${{ env.COMMIT_HASH }}.jar