Update engine SDK version in ImmutableDataTypes.h #11
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: "Update engine SDK version in ImmutableDataTypes.h" | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
description: 'Version to update to (e.g. 1.20.0)' | |
required: true | |
jobs: | |
update: | |
runs-on: ubuntu-latest | |
env: | |
GH_TOKEN: ${{ secrets.UNREAL_IMMUTABLE_SDK_GITHUB_TOKEN }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Check team membership | |
id: check_team | |
run: | | |
./.github/scripts/check_team_membership.sh "${{ github.actor }}" "${{ secrets.UNREAL_IMMUTABLE_SDK_GITHUB_TOKEN }}" | |
# shellcheck disable=SC1090 | |
source "$GITHUB_ENV" | |
echo "${{ github.actor }} is a member of the SDK team: $IS_MEMBER" | |
if [[ "$IS_MEMBER" != "true" ]]; then | |
echo "Not a member of the SDK team, skipping update" | |
exit 1 | |
fi | |
- name: Replace engine sdk version string | |
id: replace_engine_sdk_version | |
run: | | |
FILE=./Source/Immutable/Public/Immutable/ImmutableDataTypes.h | |
VERSION=${{ github.event.inputs.version }} | |
sed -i -E "s/#define ENGINE_SDK_VERSION TEXT\(\"[0-9]+\.[0-9]+\.[0-9]+\"\)/#define ENGINE_SDK_VERSION TEXT(\"$VERSION\")/g" $FILE | |
- uses: gr2m/create-or-update-pull-request-action@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
title: "release: update version" | |
body: "Update version in ImmutableDataTypes.h" | |
branch: "release/update-version" | |
commit-message: "release: update version" | |
labels: release |