Sha256: 55c631d66e25c84640d08a621adde1aa35cb7f3598305b2ae66e2d3c726b3d35

Contents?: true

Size: 1.49 KB

Versions: 1

Compression:

Stored size: 1.49 KB

Contents

name: Release
on:
  push:
    branches:
      - master
jobs:
  check-release:
    container:
      image: ruby:3.1
    outputs:
      release: ${{ steps.check-release.outputs.release }}
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v3
        with:
          fetch-depth: 2
      - id: check-release
        name: Decide whether to release
        run: |
          set +e
          git diff --exit-code --quiet HEAD~1 -- lib/jekyll-linkpreview/version.rb
          if [ $? = 1 ]; then
            echo release=true >> ${GITHUB_OUTPUT}
          else
            echo release=false >> ${GITHUB_OUTPUT}
          fi
  release:
    container:
      image: ruby:3.1
    if: needs.check-release.outputs.release == 'true'
    needs: check-release
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v3
      - env:
          RUBYGEMS_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }}
        name: Set credentials for RubyGems
        run: |
          mkdir ~/.gem
          echo :rubygems_api_key: ${RUBYGEMS_API_KEY} > ~/.gem/credentials
          chmod 0600 ~/.gem/credentials
      - name: Configure git
        run: |
          git config --global user.email "yusuke.nishioka.0713@gmail..com"
          git config --global user.name "Yusuke Nishioka"
      - name: Install dependencies
        run: bundle install
      - env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        name: Make a new release
        run: bundle exec rake release

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
jekyll-linkpreview-0.6.0.rc1 .github/workflows/release.yaml