mirror of
https://github.com/GTNewHorizons/GTNH-Actions-Workflows.git
synced 2025-07-03 02:41:29 +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
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout mod repo
|
- name: Checkout mod repo
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- name: Checkout workflows repo
|
- name: Checkout workflows repo
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
repository: GTNewHorizons/GTNH-Actions-Workflows
|
repository: GTNewHorizons/GTNH-Actions-Workflows
|
||||||
path: .gtnh-workflows
|
path: .gtnh-workflows
|
||||||
@ -41,7 +41,7 @@ jobs:
|
|||||||
uses: gradle/wrapper-validation-action@v1
|
uses: gradle/wrapper-validation-action@v1
|
||||||
|
|
||||||
- name: Set up JDK 8 and 17
|
- name: Set up JDK 8 and 17
|
||||||
uses: actions/setup-java@v3
|
uses: actions/setup-java@v4
|
||||||
with:
|
with:
|
||||||
java-version: |
|
java-version: |
|
||||||
8
|
8
|
||||||
@ -59,7 +59,7 @@ jobs:
|
|||||||
run: ./gradlew --build-cache --info --stacktrace assemble
|
run: ./gradlew --build-cache --info --stacktrace assemble
|
||||||
|
|
||||||
- name: Attach compilation artifacts
|
- name: Attach compilation artifacts
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: build-libs
|
name: build-libs
|
||||||
path: 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 }}
|
VERSION: ${{ github.ref_name }}
|
||||||
RELEASE_VERSION: ${{ github.ref_name }}
|
RELEASE_VERSION: ${{ github.ref_name }}
|
||||||
SNAPSHOT: ${{ endsWith(github.ref_name, '-snapshot') || contains(github.event.head_commit.message, '[snapshot]') }}
|
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:
|
steps:
|
||||||
- name: Checkout mod repo
|
- name: Checkout mod repo
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 32
|
fetch-depth: 32
|
||||||
|
|
||||||
@ -38,7 +39,7 @@ jobs:
|
|||||||
uses: gradle/wrapper-validation-action@v1
|
uses: gradle/wrapper-validation-action@v1
|
||||||
|
|
||||||
- name: Set up JDK 8 and 17
|
- name: Set up JDK 8 and 17
|
||||||
uses: actions/setup-java@v3
|
uses: actions/setup-java@v4
|
||||||
with:
|
with:
|
||||||
java-version: |
|
java-version: |
|
||||||
8
|
8
|
||||||
@ -50,10 +51,10 @@ jobs:
|
|||||||
run: chmod +x gradlew
|
run: chmod +x gradlew
|
||||||
|
|
||||||
- name: Setup the workspace
|
- 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
|
- 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
|
# 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 }}
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Publish to Maven
|
- 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
|
continue-on-error: true
|
||||||
env:
|
env:
|
||||||
MAVEN_USER: ${{ secrets.MAVEN_USER }}
|
MAVEN_USER: ${{ secrets.MAVEN_USER }}
|
||||||
@ -91,7 +92,7 @@ jobs:
|
|||||||
if: ${{ env.MAVEN_USER != '' }}
|
if: ${{ env.MAVEN_USER != '' }}
|
||||||
|
|
||||||
- name: Publish to Modrinth and CurseForge
|
- 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
|
continue-on-error: true
|
||||||
env:
|
env:
|
||||||
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
|
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user