Skip to content

Commit

Permalink
Potentially fix the publishing to snapshot repository
Browse files Browse the repository at this point in the history
  • Loading branch information
OroArmor committed Aug 24, 2021
1 parent cf4384f commit 18e09fe
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 4 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/generate-and-publish-snapshot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: "Generate and publish to Snapshot Repository"
on:
workflow_dispatch:
inputs:
version:
description: "Minecraft version from the version manifest"
required: true

jobs:
generate-and-publish:
runs-on: ubuntu-latest
container:
image: openjdk:16-jdk
options: --user root
steps:
- name: Cache build and application cache
uses: actions/cache@v2
with:
path: |
./build
./cache
key: hashed-mojmap
- name: Checkout repository
uses: actions/checkout@v2
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v1
- name: Generate and publish mappings
run: ./gradlew publish -PminecraftVersion="${{ github.event.inputs.version }}" --stacktrace
env:
MAVEN_URL: ${{ secrets.SNAPSHOTS_URL }}
MAVEN_USERNAME: ${{ secrets.SNAPSHOTS_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.SNAPSHOTS_PASSWORD }}
6 changes: 3 additions & 3 deletions .github/workflows/generate-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ jobs:
- name: Generate and publish mappings
run: ./gradlew publish -PminecraftVersion="${{ github.event.inputs.version }}" --stacktrace
env:
MAVEN_URL: ${{ secrets.SNAPSHOTS_URL }}
MAVEN_USERNAME: ${{ secrets.SNAPSHOTS_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.SNAPSHOTS_PASSWORD }}
MAVEN_URL: ${{ secrets.MAVEN_URL }}
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ publishing {
def ENV = System.getenv()

if (ENV.MAVEN_URL) {
repositories.maven {
maven {
url = ENV.MAVEN_URL

credentials {
Expand Down

0 comments on commit 18e09fe

Please sign in to comment.