-
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Alpha <[email protected]>
- Loading branch information
Showing
1 changed file
with
34 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,8 +15,7 @@ jobs: | |
release: | ||
strategy: | ||
matrix: | ||
base_jdk: [21] | ||
graal: [latest] | ||
base_jdk: [17] | ||
os: [ubuntu-22.04] | ||
|
||
if: "!startsWith(github.event.commits[0].message, '[CI-Skip]')" | ||
|
@@ -27,21 +26,22 @@ jobs: | |
|
||
- name: Checkout javadocs | ||
uses: actions/checkout@v4 | ||
if: github.ref_name == env.MAIN_BRANCH | ||
with: | ||
repository: PlazmaMC/Javadocs | ||
path: javadoc | ||
ref: main | ||
token: ${{ secrets.GH_PAT }} | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Validate Gradle Wrapper | ||
uses: gradle/wrapper-validation-action@v1 | ||
|
||
- name: Set up GraalVM ${{ matrix.base_jdk }} | ||
uses: graalvm/setup-graalvm@v1 | ||
with: | ||
github-token: ${{ secrets.GH_PAT }} | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
java-version: ${{ matrix.base_jdk }} | ||
version: ${{ matrix.graal }} | ||
version: latest | ||
cache: 'gradle' | ||
|
||
- name: Configure Git | ||
|
@@ -72,11 +72,11 @@ jobs: | |
if: github.ref_name == env.MAIN_BRANCH | ||
run: | | ||
export GITHUB_USERNAME=${{ env.ORG_NAME }} | ||
export GITHUB_TOKEN=${{ secrets.GH_PAT }} | ||
export GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} | ||
./gradlew publish --stacktrace | ||
- name: Upload Artifacts | ||
if: env.DEBUG == 'true' || !startsWith(github.ref_name, 'ver/') | ||
if: "!startsWith(github.ref_name, 'ver/')" | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: Artifacts | ||
|
@@ -85,24 +85,40 @@ jobs: | |
Plazma-API/build/docs/javadoc | ||
- name: Get Release Number | ||
run: echo "RELEASE=$(git ls-remote --tags origin | grep "release" | wc -l)" >> $GITHUB_ENV | ||
if: startsWith(github.ref_name, 'ver/') | ||
run: echo "RELEASE=$(git ls-remote --tags origin | grep "build/${{ env.MC_VERSION }}" | wc -l)" >> $GITHUB_ENV | ||
|
||
- name: Release Artifacts | ||
if: startsWith(github.ref_name, 'ver/') | ||
uses: marvinpinto/action-automatic-releases@latest | ||
uses: softprops/action-[email protected] | ||
with: | ||
title: "Release #${{ env.RELEASE }}" | ||
automatic_release_tag: release-${{ env.RELEASE }} | ||
repo_token: "${{ secrets.GH_PAT }}" | ||
name: "Build #${{ env.RELEASE }} for ${{ env.MC_VERSION }}" | ||
tag_name: build/${{ env.MC_VERSION }}/${{ env.RELEASE }} | ||
target_commitish: ${{ github.ref_name }} | ||
generate_release_notes: true | ||
fail_on_unmatched_files: true | ||
files: build/libs/*.jar | ||
prerelease: false | ||
|
||
- name: Release Artifacts (Latest) | ||
- name: Release Artifacts (Latest/Stable) | ||
if: startsWith(github.ref_name, 'ver/') | ||
uses: marvinpinto/action-automatic-releases@latest | ||
uses: softprops/action-[email protected] | ||
with: | ||
title: "Release #${{ env.RELEASE }}" | ||
automatic_release_tag: latest-${{ env.MC_VERSION }} | ||
repo_token: "${{ secrets.GH_PAT }}" | ||
name: "Build #${{ env.RELEASE }} for ${{ env.MC_VERSION }}" | ||
tag_name: build/${{ env.MC_VERSION }}/latest | ||
target_commitish: ${{ github.ref_name }} | ||
generate_release_notes: true | ||
fail_on_unmatched_files: true | ||
files: build/libs/*.jar | ||
|
||
- name: Release Artifacts (Latest/Development) | ||
if: startsWith(github.ref_name, 'dev/') | ||
uses: softprops/[email protected] | ||
with: | ||
name: "Development Build for ${{ env.MC_VERSION }}" | ||
tag_name: build/${{ env.MC_VERSION }}/latest | ||
target_commitish: ${{ github.ref_name }} | ||
generate_release_notes: true | ||
fail_on_unmatched_files: true | ||
files: build/libs/*.jar | ||
|
||
prerelease: false |