Sha256: 41b6d7712c92b89750c9f514a654457a49dcf8359ca414ae67b66ef469a0385b

Contents?: true

Size: 1.79 KB

Versions: 23

Compression:

Stored size: 1.79 KB

Contents

name: release

on:
  push:
    tags:
      - '*'
  workflow_dispatch:
    inputs:
      next_version:
        description: |
          Next release version. Possible values: x.y.z, major, minor, patch or pre|rc|etc
        required: true
        default: 'skip'

jobs:
  prepare:
    uses: metanorma/ci/.github/workflows/prepare-rake.yml@main

  release:
    runs-on: ubuntu-latest
    needs: prepare
    steps:
      - uses: actions/checkout@v3
        with:
          token: ${{ secrets.METANORMA_CI_PAT_TOKEN }}

      - run: |
          git config user.name "metanorma-ci"
          git config user.email "metanorma-ci@users.noreply.github.com"

      - uses: ruby/setup-ruby@v1
        with:
          ruby-version: ${{ needs.prepare.outputs.default-ruby-version }}
          bundler-cache: true

      - if: github.event_name == 'workflow_dispatch' && inputs.next_version != 'skip'
        run: rm -f bin/mn2pdf.jar

      - run: bundle exec rake

      - run: gem install gem-release

      - if: github.event_name == 'workflow_dispatch' && inputs.next_version != 'skip'
        run: |
          gem bump --version ${{ inputs.next_version }} --no-commit
          git add -u lib/mn2pdf/version.rb
          git commit -m "Bump version to ${{ inputs.next_version }}"
          git tag v${{ inputs.next_version }}
          git push origin HEAD:${GITHUB_REF} --tags

      - uses: actions-mn/gem-release@main
        with:
          api-key: ${{ secrets.METANORMA_CI_RUBYGEMS_API_KEY }}
          release-command: gem release

      - 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
          filename: .github/RELEASE_ISSUE_TEMPLATE.md

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
mn2pdf-2.13 .github/workflows/release.yml
mn2pdf-2.12 .github/workflows/release.yml
mn2pdf-2.11 .github/workflows/release.yml
mn2pdf-2.10 .github/workflows/release.yml
mn2pdf-2.09 .github/workflows/release.yml
mn2pdf-2.08 .github/workflows/release.yml
mn2pdf-2.07 .github/workflows/release.yml
mn2pdf-2.06 .github/workflows/release.yml
mn2pdf-2.05 .github/workflows/release.yml
mn2pdf-2.04 .github/workflows/release.yml
mn2pdf-2.03 .github/workflows/release.yml
mn2pdf-2.02 .github/workflows/release.yml
mn2pdf-2.01 .github/workflows/release.yml
mn2pdf-2.00 .github/workflows/release.yml
mn2pdf-1.99 .github/workflows/release.yml
mn2pdf-1.98 .github/workflows/release.yml
mn2pdf-1.97 .github/workflows/release.yml
mn2pdf-1.96 .github/workflows/release.yml
mn2pdf-1.95 .github/workflows/release.yml
mn2pdf-1.94 .github/workflows/release.yml