Skip to content
This repository has been archived by the owner on Mar 22, 2023. It is now read-only.

Commit

Permalink
Workflows!
Browse files Browse the repository at this point in the history
  • Loading branch information
YoungerMax committed Dec 23, 2021
1 parent 125c3b0 commit 942ace2
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 9 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Publish

on:
release:
types:
- published

jobs:
publish:
runs-on: ubuntu-latest
container:
image: gradle:jdk8
steps:
- uses: actions/checkout@v2
name: Check out

- run: gradle publishJarRemapperDevPluginMarkerMavenPublicationToPocolifoRepository publishPluginMavenPublicationToPocolifoRepository
name: Publish
env:
RELEASE_VERSION: ${{ github.ref_name }}
REPO_URL: ${{ secrets.REPO_URL }}
REPO_USERNAME: ${{ secrets.REPO_USERNAME }}
REPO_PASSWORD: ${{ secrets.REPO_PASSWORD }}
23 changes: 14 additions & 9 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ publishing {
name = 'JAR Remapper Dev'
description = 'Developer plugin for JAR Remapper'
artifactId = 'devplugin'
version = System.getenv("RELEASE_VERSION")

licenses {
license {
Expand All @@ -60,18 +61,22 @@ publishing {
}

repositories {
maven {
url 'https://maven.services.pocolifo.com/releases'
name 'pocolifo'
if (System.getenv("REPO_URL")) {
maven {
url System.getenv("REPO_URL")
name 'pocolifo'

credentials {
username = System.getenv("REPO_USERNAME")
password = System.getenv("REPO_PASSWORD")
}
credentials {
username = System.getenv("REPO_USERNAME")
password = System.getenv("REPO_PASSWORD")
}

authentication {
basic(BasicAuthentication)
authentication {
basic(BasicAuthentication)
}
}
} else {
mavenLocal()
}
}
}

0 comments on commit 942ace2

Please sign in to comment.