Sha256: cc37c9b653fc88ec45dfc53c69d9b99b90d099c0b26e050975962cd786eb304d

Contents?: true

Size: 1.64 KB

Versions: 3

Compression:

Stored size: 1.64 KB

Contents

name: Create release PR

on:
  workflow_dispatch:
    inputs:
      version:
        description: "The new version number with 'v' prefix. Example: v1.40.1"
        required: true

jobs:
  init_release:
    name: 🚀 Create release PR
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
        with:
          fetch-depth: 0 # gives the changelog generator access to all previous commits

      - name: Update CHANGELOG.md, version.rb and push release branch
        env:
          VERSION: ${{ github.event.inputs.version }}
        run: |
          npx --yes standard-version@9.3.2 --release-as "$VERSION" --skip.tag --skip.commit --tag-prefix=v
          git config --global user.name 'github-actions' 
          git config --global user.email 'release@getstream.io'
          git checkout -q -b "release-$VERSION"
          git commit -am "chore(release): $VERSION"
          git push -q -u origin "release-$VERSION"

      - name: Get changelog diff
        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())

      - name: Open pull request
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        run: |
          gh pr create \
            -t "Release ${{ github.event.inputs.version }}" \
            -b "# :rocket: ${{ github.event.inputs.version }}
            Make sure to use squash & merge when merging!
            Once this is merged, another job will kick off automatically and publish the package.
            # :memo: Changelog
            ${{ env.CHANGELOG }}"

Version data entries

3 entries across 3 versions & 1 rubygems

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