mirror of
https://github.com/GTNewHorizons/GTNH-Actions-Workflows.git
synced 2025-07-01 18:01:28 +02:00
Centrally changeable maven publishing URL (#34)
* Use a centrally set maven publishing URL for the entire organization * Update action versions in build-and-test too
This commit is contained in:
parent
a32d3680b9
commit
48cd5ccaf4
8
.github/workflows/build-and-test.yml
vendored
8
.github/workflows/build-and-test.yml
vendored
@ -27,11 +27,11 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout mod repo
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Checkout workflows repo
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: GTNewHorizons/GTNH-Actions-Workflows
|
||||
path: .gtnh-workflows
|
||||
@ -41,7 +41,7 @@ jobs:
|
||||
uses: gradle/wrapper-validation-action@v1
|
||||
|
||||
- name: Set up JDK 8 and 17
|
||||
uses: actions/setup-java@v3
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
java-version: |
|
||||
8
|
||||
@ -59,7 +59,7 @@ jobs:
|
||||
run: ./gradlew --build-cache --info --stacktrace assemble
|
||||
|
||||
- name: Attach compilation artifacts
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: build-libs
|
||||
path: build/libs/
|
||||
|
13
.github/workflows/release-tags.yml
vendored
13
.github/workflows/release-tags.yml
vendored
@ -28,9 +28,10 @@ jobs:
|
||||
VERSION: ${{ github.ref_name }}
|
||||
RELEASE_VERSION: ${{ github.ref_name }}
|
||||
SNAPSHOT: ${{ endsWith(github.ref_name, '-snapshot') || contains(github.event.head_commit.message, '[snapshot]') }}
|
||||
MAVEN_PUBLISHING_URL: ${{ vars.MAVEN_PUBLISHING_URL || 'https://nexus.gtnewhorizons.com/repository/releases/' }}
|
||||
steps:
|
||||
- name: Checkout mod repo
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 32
|
||||
|
||||
@ -38,7 +39,7 @@ jobs:
|
||||
uses: gradle/wrapper-validation-action@v1
|
||||
|
||||
- name: Set up JDK 8 and 17
|
||||
uses: actions/setup-java@v3
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
java-version: |
|
||||
8
|
||||
@ -50,10 +51,10 @@ jobs:
|
||||
run: chmod +x gradlew
|
||||
|
||||
- name: Setup the workspace
|
||||
run: ./gradlew --build-cache --info --stacktrace ${{ inputs.workspace }}
|
||||
run: ./gradlew --build-cache --info --stacktrace -PmavenPublishUrl='${{ env.MAVEN_PUBLISHING_URL }}' ${{ inputs.workspace }}
|
||||
|
||||
- name: Build the mod
|
||||
run: ./gradlew --build-cache --info --stacktrace build
|
||||
run: ./gradlew --build-cache --info --stacktrace -PmavenPublishUrl='${{ env.MAVEN_PUBLISHING_URL }}' build
|
||||
|
||||
# Continue on error in the following steps to make sure releases still get made even if one of the methods fails
|
||||
|
||||
@ -83,7 +84,7 @@ jobs:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Publish to Maven
|
||||
run: ./gradlew --build-cache --info --stacktrace build publish
|
||||
run: ./gradlew --build-cache --info --stacktrace -PmavenPublishUrl='${{ env.MAVEN_PUBLISHING_URL }}' build publish
|
||||
continue-on-error: true
|
||||
env:
|
||||
MAVEN_USER: ${{ secrets.MAVEN_USER }}
|
||||
@ -91,7 +92,7 @@ jobs:
|
||||
if: ${{ env.MAVEN_USER != '' }}
|
||||
|
||||
- name: Publish to Modrinth and CurseForge
|
||||
run: ./gradlew --build-cache --info --stacktrace build publish
|
||||
run: ./gradlew --build-cache --info --stacktrace -PmavenPublishUrl='${{ env.MAVEN_PUBLISHING_URL }}' build publish
|
||||
continue-on-error: true
|
||||
env:
|
||||
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
|
||||
|
Loading…
x
Reference in New Issue
Block a user