Sha256: c13ce3a58f4bcebad1f99283de2ef9fd4b33ea4679810001cc4c6b1d1785427a

Contents?: true

Size: 1.56 KB

Versions: 1

Compression:

Stored size: 1.56 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@v2
      - name: Add writable remote
        run: |
          git config --global user.name "${GITHUB_ACTOR}"
          git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
          git remote add github https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY
          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}"
      - 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.14 .github/workflows/release-tag.yml