-
Notifications
You must be signed in to change notification settings - Fork 0
87 lines (77 loc) · 2.52 KB
/
release.yaml
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
name: "godot-ci export"
on:
push:
branches:
- main
env:
GODOT_VERSION: 4.1.2
EXPORT_NAME: SmashEm
jobs:
project-version:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-tags: true
- name: Get current tag
id: current-tag
uses: WyriHaximus/[email protected]
with:
fallback: v0
- name: Increase tag version
id: next-tag
uses: WyriHaximus/[email protected]
with:
version: ${{ steps.current-tag.outputs.tag }}
strict: false
outputs:
projectVersion: ${{ steps.next-tag.outputs.v_major }}
export-windows:
name: Windows Export
needs: project-version
runs-on: ubuntu-20.04
container:
image: barichello/godot-ci:4.1.2
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
lfs: true
- name: Setup
run: |
mkdir -v -p ~/.local/share/godot/export_templates
cp -a /root/.local/share/godot/templates/. ~/.local/share/godot/export_templates/
mkdir -v -p ~/.local/share/godot/templates
mv /root/.local/share/godot/templates/${GODOT_VERSION}.stable ~/.local/share/godot/templates/${GODOT_VERSION}.stable
- name: Windows Build
run: |
mkdir -v -p build/windows
godot -v --headless --export-release "Windows Desktop" build/windows/$EXPORT_NAME.exe
pwd
ls
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: windows-${{ needs.project-version.outputs.projectVersion }}
path: build/windows/
if-no-files-found: error
outputs:
projectVersion: ${{ needs.project-version.outputs.projectVersion }}
gitops:
runs-on: ubuntu-20.04
needs: [export-windows]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-tags: true
- name: Push gitops changes to git
run: |
tag=${{ needs.export-windows.outputs.projectVersion }}
message='Bump version - ${{ needs.export-windows.outputs.projectVersion }}: PR #${{ github.event.pull_request.number }} ${{ github.event.pull_request.title }}'
git config user.name "${GITHUB_ACTOR}"
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
git tag -a "${tag}" -m "${message}"
git push origin "${tag}"