-
Notifications
You must be signed in to change notification settings - Fork 8
47 lines (42 loc) · 1.51 KB
/
update-version.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
---
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: "chore: update version"
body: "Update version in ImmutableDataTypes.h"
branch: "chore/update-version"
commit-message: "chore: update version"
labels: release