summaryrefslogtreecommitdiffstats
path: root/.github
diff options
context:
space:
mode:
authorLMBishop <13875753+LMBishop@users.noreply.github.com>2021-06-10 14:01:52 +0100
committerLMBishop <13875753+LMBishop@users.noreply.github.com>2021-06-10 14:01:52 +0100
commitfa7693528fd5fdafa81ffd17841353109d24a63f (patch)
treed655d081b2079a537a3c3d74644b1593dbdb2167 /.github
parent55c618a2c5ec1be5e9cbfa2d885b970734fb320d (diff)
Add publishing
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/build.yml4
-rw-r--r--.github/workflows/publish.yml22
2 files changed, 24 insertions, 2 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 16a80b27..087fff2b 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -1,4 +1,4 @@
-name: Build Plugin
+name: Build plugin
on: ["pull_request", "push"]
@@ -37,4 +37,4 @@ jobs:
uses: actions/upload-artifact@master
with:
name: Quests-JDK${{ matrix.java }}
- path: build/libs/*.jar \ No newline at end of file
+ path: build/libs/*.jar
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
index e69de29b..ffc22cbd 100644
--- a/.github/workflows/publish.yml
+++ b/.github/workflows/publish.yml
@@ -0,0 +1,22 @@
+name: Publish plugin to repository
+on:
+ release:
+ types: [created]
+jobs:
+ publish:
+ runs-on: ubuntu-18.04
+ permissions:
+ contents: read
+ packages: write
+ steps:
+ - uses: actions/checkout@v2
+ - name: Set up Java
+ uses: actions/setup-java@v2
+ with:
+ java-version: '1.8'
+ distribution: 'adopt'
+ - name: Publish to repository
+ run: gradle publish
+ env:
+ MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
+ MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}