From efbd5d99861adb61318628f8a129ce90082dc4c9 Mon Sep 17 00:00:00 2001 From: Marc Zimmermann Date: Fri, 8 Oct 2021 11:14:13 +0200 Subject: [PATCH] setting up ci for releases --- .github/workflows/ci.yml | 42 +++++++++++++++++++++++++++++------ deidentifier-pipeline/pom.xml | 2 +- 2 files changed, 36 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0c01eb2..3d7a506 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,11 +2,13 @@ name: Java CI with Maven -on: - push: - branches: [ main ] - pull_request: - branches: [ main ] +on: [push] + +#on: +# push: +# branches: [ main ] +# pull_request: +# branches: [ main ] jobs: build: @@ -26,5 +28,31 @@ jobs: run: echo "::set-output name=date::$(date +'%Y%m%d%H%M')" - uses: actions/upload-artifact@v2 with: - name: deidentification-snapshot-${{ steps.date.outputs.date }}.jar - path: deidentifier-pipeline/target/deidentifier-0.1-SNAPSHOT.jar + name: deidentification-snapshot-${{ steps.date.outputs.date }}.zip + path: deidentifier-pipeline/target/deidentifier-*.jar + release: + name: Create Release + if: contains(github.ref, 'tags/v') + runs-on: ubuntu-latest + needs: [build] + steps: + - name: fetch jar + uses: actions/download-artifact@v2 + with: + path: artifacts + + - name: Tag name + id: tag_name + run: | + echo ::set-output name=TAG::${GITHUB_REF#refs/tags/} + + - name: create release + uses: svenstaro/upload-release-action@v2 + with: + release_name: Release ${{ steps.tag_name.outputs.TAG }} + body: Release ${{ steps.tag_name.outputs.TAG }} + file: 'artifacts/*/*' + file_glob: true + repo_token: ${{ secrets.GITHUB_TOKEN }} + tag: ${{ github.ref }} + prerelease: true diff --git a/deidentifier-pipeline/pom.xml b/deidentifier-pipeline/pom.xml index d8959a2..9ff99a5 100644 --- a/deidentifier-pipeline/pom.xml +++ b/deidentifier-pipeline/pom.xml @@ -7,7 +7,7 @@ org.ratschlab deidentifier jar - 0.1-SNAPSHOT + 0.99 1.8