Acrarium/.github/workflows/release-build.yml
2019-11-20 04:16:27 +01:00

42 lines
1.2 KiB
YAML

name: release-build
on:
push:
tags:
- 'v*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-java@v1
with:
java-version: '1.13'
- name: Build release
run: ./mvnw -B clean package -Pproduction
- name: Extract version
id: version
run: echo ::set-output name=value::$(./mvnw org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version | grep '^[0-9]')
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
draft: false
prerelease: true
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./acrarium/target/acrarium-${{ steps.version.outputs.value }}.war
asset_name: acrarium-${{ steps.version.outputs.value }}.war
asset_content_type: application/zip