Sha256: 22de6006d14d1007685b9ba48f7a1b735feda0ce5f74dbc6407bbf9a3a74b199

Contents?: true

Size: 1.13 KB

Versions: 3

Compression:

Stored size: 1.13 KB

Contents

name: Release

on:
  pull_request:
    types: [closed]
    branches:
      - master

jobs:
  Release:
    name: 🚀 Release
    if: github.event.pull_request.merged && startsWith(github.head_ref, 'release-')
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
        with:
          fetch-depth: 0
  
      - uses: actions/github-script@v5
        with:
          script: |
            const get_change_log_diff = require('./scripts/get_changelog_diff.js')
            core.exportVariable('CHANGELOG', get_change_log_diff())

            // Getting the release version from the PR source branch
            // Source branch looks like this: release-1.0.0
            const version = context.payload.pull_request.head.ref.split('-')[1]
            core.exportVariable('VERSION', version)

      - name: Publish gem
        uses: dawidd6/action-publish-gem@v1
        with:
          api_key: ${{secrets.RUBYGEMS_API_KEY}}

      - name: Create release on GitHub
        uses: ncipollo/release-action@v1
        with:
          body: ${{ env.CHANGELOG }}
          tag: ${{ env.VERSION }}
          token: ${{ secrets.GITHUB_TOKEN }}

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
stream-chat-ruby-2.17.2 .github/workflows/release.yml
stream-chat-ruby-2.17.1 .github/workflows/release.yml
stream-chat-ruby-2.17.0 .github/workflows/release.yml