|
|
@@ -1,15 +1,14 @@
|
|
|
-name: Deploy to Maven Central
|
|
|
+name: Deploy to Maven Central & GitHub
|
|
|
on:
|
|
|
workflow_dispatch:
|
|
|
release:
|
|
|
types: [created]
|
|
|
jobs:
|
|
|
- publish:
|
|
|
+ publish-maven-central:
|
|
|
runs-on: ubuntu-latest
|
|
|
steps:
|
|
|
- uses: actions/checkout@v3
|
|
|
- - name: Set up Maven Central Repository
|
|
|
- uses: actions/setup-java@v3
|
|
|
+ - uses: actions/setup-java@v3
|
|
|
with:
|
|
|
java-version: '17'
|
|
|
distribution: 'temurin'
|
|
|
@@ -26,3 +25,21 @@ jobs:
|
|
|
run: mvn -P deployment -U -B deploy
|
|
|
env:
|
|
|
GPG_PASSPHRASE: ${{ secrets.PGP_PW }}
|
|
|
+
|
|
|
+ publish-release-artifact:
|
|
|
+ runs-on: ubuntu-latest
|
|
|
+ steps:
|
|
|
+ - uses: actions/checkout@v3
|
|
|
+ - uses: actions/setup-java@v3
|
|
|
+ with:
|
|
|
+ java-version: '17'
|
|
|
+ distribution: 'temurin'
|
|
|
+ - name: Build JPlag
|
|
|
+ run: mvn -U -B clean package assembly:single
|
|
|
+
|
|
|
+ - name: Attach CLI to Release on GitHub
|
|
|
+ uses: softprops/action-gh-release@v1
|
|
|
+ if: startsWith(github.ref, 'refs/tags/')
|
|
|
+ with:
|
|
|
+ files: jplag.cli/target/jplag-*-jar-with-dependencies.jar
|
|
|
+ fail_on_unmatched_files: true
|