-
-
Notifications
You must be signed in to change notification settings - Fork 95
45 lines (43 loc) · 1.62 KB
/
build-master.yml
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
name: Build and publish BedWars master
on:
push:
branches: [ master ]
concurrency: bedwars_master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set the Build number
id: calculated_build_number
env:
NUM: ${{ github.run_number }}
run: echo "build_n=$(($NUM+865))" >> $GITHUB_OUTPUT
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
cache: 'gradle'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew
env:
NEXUS_URL_RELEASE: ${{ secrets.NEXUS_URL_RELEASE }}
NEXUS_URL_SNAPSHOT: ${{ secrets.NEXUS_URL_SNAPSHOT }}
NEXUS_USERNAME: ${{ secrets.NEXUS_USERNAME }}
NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}
JAVADOC_HOST: ${{ secrets.JAVADOC_HOST }}
JAVADOC_SECRET: ${{ secrets.JAVADOC_SECRET }}
JAVADOC_USER: ${{ secrets.JAVADOC_USER }}
OPTIMIZE_FOR_CI_CD: "1"
BUILD_NUMBER: ${{ steps.calculated_build_number.outputs.build_n }}
WEBHOOK_URL: ${{ secrets.WEBHOOK_URL }}
REPOSILITE_BASE_URL: ${{ secrets.REPOSILITE_BASE_URL }}
GITHUB_ACTIONS_URL: "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
GITHUB_COMMIT_MESSAGE: "${{ github.event.head_commit.message }}"
- name: Upload the final artifact
uses: actions/upload-artifact@v4
with:
path: plugin/universal/build/libs/BedWars*[!s].jar