Sha256: 3b207eeb91bce036a3703bfcf65b0cfbb483f1427970cb8d0d9a8b974f739e94

Contents?: true

Size: 1.63 KB

Versions: 1

Compression:

Stored size: 1.63 KB

Contents

name: release-tag

on:
  repository_dispatch:
    types: [ metanorma/mn2pdf ]

jobs:
  tag_repo:
    runs-on: ubuntu-18.04
    if: startsWith(github.event.client_payload.ref, 'refs/tags/v')
    steps:
      - uses: actions/checkout@v1
      - name: Add writable remote
        run: |
          git config --global user.name "metanorma-ci"
          git config --global user.email "metanorma-ci@users.noreply.github.com"
          git remote add github "https://metanorma-ci:${{ secrets.METANORMA_CI_PAT_TOKEN }}@github.com/$GITHUB_REPOSITORY.git"
          git pull github ${GITHUB_REF} --ff-only
      - name: Parse mn2pdf version
        env:
          MN2PDF_TAG: ${{ github.event.client_payload.ref }}
        run: |
          echo "::set-env name=MN2PDF_VERSION::${MN2PDF_TAG#*/v}"
          echo MN2PDF_VERSION=${MN2PDF_TAG#*/v} >> ${GITHUB_ENV}
      - name: Use Ruby
        uses: actions/setup-ruby@v1
        with:
          ruby-version: '2.6'
          architecture: 'x64'
      - name: Update gems
        run: |
          gem install gem-release
          gem install bundler
          bundle install --jobs 4 --retry 3
      - name: Update version
        run: |
          gem bump --version ${MN2PDF_VERSION} --no-commit
      - name: Update mn2pdf.jar
        run: |
          rm -f bin/mn2pdf.jar
          rake bin/mn2pdf.jar
      - name: Run specs
        run: |
          bundle exec rake
      - name: Push commit and tag
        run: |
          git add -u bin/mn2pdf.jar lib/mn2pdf/version.rb
          git commit -m "Bump version to ${MN2PDF_VERSION}"
          git tag v${MN2PDF_VERSION}
          git push github HEAD:${GITHUB_REF} --tags

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mn2pdf-1.25 .github/workflows/release-tag.yml