Sha256: 603953fa7e69f9bb3d0e2dae0e0ce7109245ccbb6bc707c293b4b2779bd93bb1

Contents?: true

Size: 1.63 KB

Versions: 10

Compression:

Stored size: 1.63 KB

Contents

name: Bump version and Release
on:
  release:
    types: [published]

jobs:
  release:
    runs-on: ubuntu-latest
    strategy:
      fail-fast: true

    steps: 
      - name: Checkout source code
        uses: actions/checkout@v2.3.4
        with:
          persist-credentials: false
          fetch-depth: 0 # otherwise, you will fail to push refs to dest repo

      - name: Install required ruby version
        uses: ruby/setup-ruby@v1 

      - name: Get version from latest tag
        id: get_version
        uses: battila7/get-version-action@v2

      - name: Bump version   
        run: |
          gem install -N gem-release
          git config --local user.email "action@github.com"
          git config --local user.name "GitHub Action"
          gem bump --skip-ci --version ${{ steps.get_version.outputs.version-without-v }}

      - name: Push changes
        uses: ad-m/github-push-action@master
        with:
          # GitHub Actions token does not support pushing to protected branches.
          # github_token: ${{ secrets.GITHUB_TOKEN }}
          #        
          # A manually populated`PERSONAL_ACCESS_TOKEN` environment variable 
          # with permissions to push to a protected branch must be used.
          # not ideal - keep eyes open for a better solution
          github_token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}

      - name: Release gem to rubygems.org    
        run: |
          set +x
          mkdir -p ~/.gem
          cat << EOF > ~/.gem/credentials
          ---
          :rubygems_api_key: ${{ secrets.RUBYGEMS_API_KEY }}
          EOF
          chmod 0600 ~/.gem/credentials
          set -x
          gem release

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
finapps-6.5.0 .github/workflows/release.yml
finapps-6.4.3 .github/workflows/release.yml
finapps-6.4.2 .github/workflows/release.yml
finapps-6.4.1 .github/workflows/release.yml
finapps-6.4.0 .github/workflows/release.yml
finapps-6.3.1 .github/workflows/release.yml
finapps-6.3.0 .github/workflows/release.yml
finapps-6.2.0 .github/workflows/release.yml
finapps-6.1.0 .github/workflows/release.yml
finapps-6.0.0 .github/workflows/release.yml