Skip to content

Commit

Permalink
setting up ci for releases
Browse files Browse the repository at this point in the history
  • Loading branch information
Marc Zimmermann committed Oct 8, 2021
1 parent 86a37a4 commit efbd5d9
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 8 deletions.
42 changes: 35 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
2 changes: 1 addition & 1 deletion deidentifier-pipeline/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<groupId>org.ratschlab</groupId>
<artifactId>deidentifier</artifactId>
<packaging>jar</packaging>
<version>0.1-SNAPSHOT</version>
<version>0.99</version>

<properties>
<maven.compiler.source>1.8</maven.compiler.source>
Expand Down

0 comments on commit efbd5d9

Please sign in to comment.