create release on tag

This commit is contained in:
Athou
2023-05-01 17:26:16 +02:00
parent deb29f0e88
commit 42ca0967b6
2 changed files with 23 additions and 12 deletions

View File

@@ -10,7 +10,8 @@ jobs:
java: [ "8", "11", "17" ]
steps:
- uses: actions/checkout@v3
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
@@ -32,16 +33,29 @@ jobs:
- name: Build with Maven
run: mvn --batch-mode --update-snapshots verify
- uses: actions/upload-artifact@v3
- name: Upload JAR
uses: actions/upload-artifact@v3
if: ${{ matrix.java == '8' }}
with:
name: commafeed.jar
path: commafeed-server/target/commafeed.jar
# Docker
- name: Create release
uses: softprops/action-gh-release@v1
if: ${{ matrix.java == '8' && github.ref_type == 'tag' }}
with:
name: CommaFeed ${{ github.ref_name }}
body: See changelog at https://github.com/Athou/commafeed/blob/master/CHANGELOG.md
draft: false
prerelease: false
files: |
commafeed-server/target/commafeed.jar
commafeed-server/config.yml.example
# Docker
- name: Login to Container Registry
if: ${{ matrix.java == '8' }}
uses: docker/login-action@v2
if: ${{ matrix.java == '8' }}
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}