Acrarium/.github/workflows/release-build.yml

43 lines
1.2 KiB
YAML
Raw Permalink Normal View History

2019-11-16 03:10:57 +00:00
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
2019-11-20 03:16:27 +00:00
run: ./mvnw -B clean package -Pproduction
- name: Extract version
id: version
2019-11-16 04:10:13 +00:00
run: echo ::set-output name=value::$(./mvnw org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version | grep '^[0-9]')
2019-11-16 03:10:57 +00:00
- name: Create Release
2019-11-16 03:21:34 +00:00
id: create_release
2019-11-16 03:10:57 +00:00
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
2019-11-16 03:21:34 +00:00
release_name: ${{ github.ref }}
2019-11-16 03:10:57 +00:00
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 }}
2019-11-16 04:03:22 +00:00
asset_path: ./acrarium/target/acrarium-${{ steps.version.outputs.value }}.war
asset_name: acrarium-${{ steps.version.outputs.value }}.war
2019-11-16 03:10:57 +00:00
asset_content_type: application/zip