-
Notifications
You must be signed in to change notification settings - Fork 83
36 lines (32 loc) · 1.06 KB
/
get_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
---
name: 🆚 Get godot version
on:
workflow_call:
outputs:
version:
description: "Which version we should use based on target branch"
value: ${{ jobs.version.outputs.version }}
# We use a godot tag(rc version) as default version for master
# because the api is changing often and this would lead to a lot of struggle
env:
MASTER_VERSION: 4.1
jobs:
version:
name: Get godot version
runs-on: ubuntu-latest
outputs:
version: ${{ steps.version.outputs.version }}
steps:
- name: 🏷 Get and set godot version
id: version
run: |
VERSION="${{ github.event.pull_request.base.ref || github.event.release.target_commitish || github.ref_name }}"
if [[ $VERSION == "master" ]]; then
VERSION="$MASTER_VERSION"
echo "We are overwrite master to latest rc version: $VERSION"
fi
echo "version=$VERSION" >> $GITHUB_OUTPUT
- name: 🌳 Log Valid Version
env:
VERSION: ${{ steps.version.outputs.version }}
run: echo "$VERSION"