#72 Add message for export control during re-publishing #13
Workflow file for this run
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
name: MPDL Release | |
on: | |
push: | |
tags: | |
- 'v*-mpdl*' | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '11' | |
distribution: 'temurin' | |
cache: 'maven' | |
- name: Set POM version env variable and build number | |
run: | | |
echo "POM_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV | |
RAW_BRANCH=$(git branch -r --contains ${{ github.ref }}) | |
BRANCH_NAME=${RAW_BRANCH##*/} | |
COMMIT_HASH=$(git rev-parse --short "$GITHUB_SHA") | |
echo "build.number=$BRANCH_NAME - $COMMIT_HASH" > ./src/main/java/BuildNumber.properties | |
- name: Build with Maven | |
run: mvn --batch-mode --update-snapshots package | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.ref_name }} | |
release_name: Release ${{ github.ref_name }} | |
draft: false | |
prerelease: false | |
- name: Upload Release Assets | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./target/dataverse-${{ env.POM_VERSION }}.war | |
asset_name: dataverse-${{ github.ref_name }}.war | |
asset_content_type: application/java-archive |