cleanup #13
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# adapted from https://github.com/actions/starter-workflows/blob/main/ci/maven.yml | |
name: Java CI with Maven | |
on: [push] | |
#on: | |
# push: | |
# branches: [ main ] | |
# pull_request: | |
# branches: [ main ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up JDK | |
uses: actions/setup-java@v2 | |
with: | |
java-version: '8' | |
distribution: 'adopt' | |
cache: maven | |
- name: Build with Maven | |
run: mvn --batch-mode package --file deidentifier-pipeline/pom.xml | |
- name: Get current date | |
id: date | |
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 }}.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 |