generated from MechanicalFlower/godot-addon-template
-
Notifications
You must be signed in to change notification settings - Fork 0
94 lines (71 loc) · 2.01 KB
/
release-packaging.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
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
88
89
90
91
92
93
94
name: Release Packaging
on:
push:
workflow_dispatch:
env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
jobs:
check:
runs-on: ubuntu-22.04
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: extractions/setup-just@v2
- name: Load dotenv
run: just ci-load-dotenv
# Retry multiple times, sometimes in CI, gdlint raise "file exists"
- name: Check
uses: nick-fields/retry@v2
with:
timeout_minutes: 1
max_attempts: 3
command: just fmt
- name: Ensure version is equal to tag
if: startsWith(github.ref, 'refs/tags/')
run: |
[ "${{ env.game_version }}" == "${{ env.BRANCH_NAME }}" ] || exit 2
test:
runs-on: ubuntu-22.04
timeout-minutes: 30
strategy:
fail-fast: true
matrix:
godot_version: ['4.1.3', '4.2.1']
steps:
- uses: actions/checkout@v4
- uses: extractions/setup-just@v2
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Test
run: just test
env:
GODOT_VERSION: ${{ matrix.godot_version }}
doc:
runs-on: ubuntu-22.04
timeout-minutes: 30
needs: [check, test]
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v4
- uses: extractions/setup-just@v2
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- run: git config user.name 'github-actions[bot]' && git config user.email 'github-actions[bot]@users.noreply.github.com'
- name: Deploy docs
run: just doc-deploy
publish:
runs-on: ubuntu-22.04
timeout-minutes: 30
needs: [check, test]
if: startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/checkout@v4
- uses: extractions/setup-just@v2
- name: Load dotenv
run: just ci-load-dotenv
- name: Publish
run: just publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}