Skip to content

Commit

Permalink
Update gradle-publish.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Qendolin committed Mar 8, 2022
1 parent 11f1bbf commit 542e3a6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,20 @@
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will build a package using Gradle and then publish it to GitHub packages when a release is created
# For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#Publishing-using-gradle

name: Gradle Package
name: Gradle Build

on:
release:
types: [created]
push:
branches:
- main

jobs:
build:

runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- uses: actions/checkout@v2
Expand All @@ -41,17 +39,3 @@ jobs:
uses: gradle/gradle-build-action@937999e9cc2425eddc7fd62d1053baf041147db7
with:
arguments: -p ./installer fatJar

- name: Publish to GitHub Packages
uses: gradle/gradle-build-action@937999e9cc2425eddc7fd62d1053baf041147db7
with:
arguments: publishGprPublicationToGitHubPackagesRepository
env:
GH_USERNAME: ${{ github.actor }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Upload installer artifact
uses: actions/[email protected]
with:
path: ./installer/build/libs/mindustry-fabric-installer-*.jar
name: mindustry-fabric-installer
12 changes: 1 addition & 11 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -108,19 +108,9 @@ publishing {
}
}
}
gpr(MavenPublication) {
from components.java
}
}

repositories {
maven {
name = "GitHubPackages"
url = uri("https://maven.pkg.github.com/Qendolin/mindustry-fabric-loader")
credentials {
username = project.findProperty("gpr.user") ?: System.getenv("GH_USERNAME")
password = project.findProperty("gpr.key") ?: System.getenv("GH_TOKEN")
}
}
}
}

0 comments on commit 542e3a6

Please sign in to comment.