Merge pull request #196 from metanorma/update #60
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: release | |
on: | |
push: | |
# Sequence of patterns matched against refs/tags | |
tags: | |
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 | |
jobs: | |
build: | |
name: Release to Maven and GitHub | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: true | |
token: ${{ secrets.METANORMA_CI_PAT_TOKEN }} | |
- name: Set up JDK 1.8 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 1.8 | |
- name: Run tests | |
run: | | |
make test | |
- name: Build | |
run: | | |
make all | |
- name: Compile output | |
run: | | |
make publish | |
# - name: Deploy to Maven | |
# env: | |
# # for deploy stepmod2mn | |
# GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }} | |
# GITHUB_USERNAME: ${{ secrets.PAT_USERNAME }} | |
# run: | | |
# make deploy | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: Release ${{ github.ref }} | |
body: | | |
Automatic release of ${{ github.ref }} | |
draft: false | |
prerelease: false | |
- name: Get Version | |
id: get_version | |
run: | | |
echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\/v/} | |
- name: Upload Release Asset | |
id: upload-release-asset | |
uses: actions/upload-release-asset@v1.0.1 | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./target/stepmod2mn-${{ steps.get_version.outputs.VERSION }}.jar | |
asset_name: stepmod2mn-${{ steps.get_version.outputs.VERSION }}.jar | |
asset_content_type: application/java-archive | |
# - name: Notify stepmod2mn-ruby | |
# uses: peter-evans/repository-dispatch@v1 | |
# with: | |
# token: ${{ secrets.METANORMA_CI_PAT_TOKEN }} | |
# repository: metanorma/stepmod2mn-ruby | |
# event-type: metanorma/stepmod2mn | |
# client-payload: '{ "ref": "${{ github.ref }}" }' |