Publish uberjar as github release (#187)

This commit is contained in:
Chris Frohoff
2022-06-28 18:44:09 -07:00
committed by GitHub
parent 8eb5cbfbf6
commit 51110f9b71
2 changed files with 47 additions and 0 deletions
+40
View File
@@ -0,0 +1,40 @@
name: publish jar
on:
push:
tags:
- "v*.*.*"
permissions:
contents: write
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
java-version: '8'
distribution: 'adopt'
cache: 'maven'
- name: Set version
run: mvn versions:set -DnewVersion=${{ github.ref_name }}
- name: Build jar
run: mvn -B clean package -DskipTests
# - name: publish maven jar
# run: mvn -B deploy -DskipTests -DrepositoryId=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Rename artifact
run: mv target/ysoserial-${{ github.ref_name }}-all.jar target/ysoserial-all.jar
- name: Publish GitHub release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: target/ysoserial-all.jar
+7
View File
@@ -438,4 +438,11 @@
</profile> </profile>
</profiles> </profiles>
<distributionManagement>
<repository>
<id>github</id>
<name>GitHub Packages</name>
<url>https://maven.pkg.github.com/frohoff/ysoserial</url>
</repository>
</distributionManagement>
</project> </project>