Skip to content

metanorma/mn2pdf

metanorma/mn2pdf #94

Workflow file for this run

name: release-tag
on:
repository_dispatch:
types: [ metanorma/mn2pdf ]
jobs:
prepare:
uses: metanorma/ci/.github/workflows/prepare-rake.yml@main
tag-repo:
runs-on: ubuntu-latest
needs: prepare
if: startsWith(github.event.client_payload.ref, 'refs/tags/v')
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.METANORMA_CI_PAT_TOKEN }}
- run: |
git config --global user.name "metanorma-ci"
git config --global user.email "[email protected]"
- name: Parse mn2pdf version
env:
MN2PDF_TAG: ${{ github.event.client_payload.ref }}
run: echo MN2PDF_VERSION=${MN2PDF_TAG#*/v} >> ${GITHUB_ENV}
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ needs.prepare.outputs.default-ruby-version }}
bundler-cache: true
- run: rm -f bin/mn2pdf.jar
- run: bundle exec rake
- run: |
gem install gem-release
gem bump --version ${MN2PDF_VERSION} --no-commit
- name: Push commit and tag
run: |
git add -u lib/mn2pdf/version.rb
git commit -m "Bump version to ${MN2PDF_VERSION}"
git tag v${MN2PDF_VERSION}
git push origin HEAD:${GITHUB_REF} --tags
- if: failure()
uses: JasonEtco/create-an-issue@v2
env:
GITHUB_TOKEN: ${{ secrets.METANORMA_CI_PAT_TOKEN }}
with:
assignees: CAMOBAP
update_existing: true
search_existing: all