Prepare Release #56
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Prepare Release | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
description: Use this to provide a version, instead of deriving it from the changelog. | |
required: false | |
type: string | |
jobs: | |
main: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Read Core version | |
id: get-core-version | |
run: | | |
cd wrappers/realm-core | |
pkgVersion=$(grep "\bVERSION:" dependencies.yml | cut -d: -f2) | |
echo "core-version=$pkgVersion" >> $GITHUB_OUTPUT | |
shell: bash | |
- name: Update Analytics.cs | |
uses: jacobtomlinson/gha-find-replace@0dfd0777cc234ef6947ec1f20873c632114c4167 #! 0.1.4 | |
with: | |
find: 'CoreVersion = "\w*"' | |
replace: 'CoreVersion = "${{ steps.get-core-version.outputs.core-version }}"' | |
include: Realm/Realm.Weaver/Analytics/Analytics.cs | |
- name: Update Changelog | |
id: update-changelog | |
uses: realm/ci-actions/update-changelog@6418e15ed9bbdb19b7d456a347e5623779f95cdf | |
with: | |
changelog: ${{ github.workspace }}/CHANGELOG.md | |
version: ${{ inputs.version }} | |
- name: Update package.json | |
uses: jacobtomlinson/gha-find-replace@0dfd0777cc234ef6947ec1f20873c632114c4167 #! 0.1.4 | |
with: | |
find: '"version": "[^"]*"' | |
replace: '"version": "${{ steps.update-changelog.outputs.new-version }}"' | |
include: Realm/Realm.Unity/package.json | |
- name: Update AssemblyInfo.props | |
uses: jacobtomlinson/gha-find-replace@0dfd0777cc234ef6947ec1f20873c632114c4167 #! 0.1.4 | |
with: | |
find: '<VersionPrefix>[^<]*<\/VersionPrefix>' | |
replace: '<VersionPrefix>${{ steps.update-changelog.outputs.new-version }}</VersionPrefix>' | |
include: Realm/AssemblyInfo.props | |
- name: Create Release PR | |
uses: peter-evans/create-pull-request@7380612b49221684fefa025244f2ef4008ae50ad #! 3.10.1 | |
with: | |
branch: release/${{ steps.update-changelog.outputs.new-version }} | |
title: Prepare for ${{ steps.update-changelog.outputs.new-version }} | |
draft: false | |
body: An automated PR for next release. | |
commit-message: Prepare for ${{ steps.update-changelog.outputs.new-version }} | |
token: ${{ secrets.REALM_CI_PAT }} |