release.yml updated for ruby 3.1 #66
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: | |
prepare-ieee: | |
uses: ./.github/workflows/prepare.yml | |
secrets: | |
pat_token: ${{ secrets.METANORMA_CI_PAT_TOKEN }} | |
build: | |
name: Release to Maven and GitHub | |
runs-on: ubuntu-latest | |
needs: [ prepare-ieee ] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
token: ${{ secrets.METANORMA_CI_PAT_TOKEN }} | |
- uses: actions/download-artifact@v3 | |
with: | |
name: ieee-test-input | |
path: ieee | |
- name: Set up JDK 1.8 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 1.8 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 3.1 | |
- run: sudo snap install yq | |
- run: sudo gem install metanorma-cli | |
- run: bundle update | |
- run: make testMN2STS | |
- run: make testSTS2MN | |
- run: make testMN2IEEE | |
- run: make all | |
- run: make mn2stsDTD_NISO | |
# - run: make mn2stsDTD_ISO | |
- run: make publish | |
# - name: Deploy to Maven | |
# env: | |
# # for deploy mn2sts | |
# GITHUB_TOKEN: ${{ secrets.METANORMA_CI_PAT_TOKEN }} | |
# GITHUB_USERNAME: ${{ secrets.METANORMA_CI_PAT_TOKEN }} | |
# 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/mnconvert-${{ steps.get_version.outputs.VERSION }}.jar | |
asset_name: mnconvert-${{ steps.get_version.outputs.VERSION }}.jar | |
asset_content_type: application/java-archive | |
- name: Notify mnconvert-ruby | |
uses: peter-evans/repository-dispatch@v1 | |
with: | |
token: ${{ secrets.METANORMA_CI_PAT_TOKEN }} | |
repository: metanorma/mnconvert-ruby | |
event-type: metanorma/mnconvert | |
client-payload: '{ "ref": "${{ github.ref }}" }' |