-
-
Notifications
You must be signed in to change notification settings - Fork 2
83 lines (75 loc) · 2.26 KB
/
release.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
name: Release
on:
workflow_dispatch:
inputs:
version:
description: 'Game Version'
required: true
# push:
# tags:
# - "v*.*.*"
jobs:
release:
runs-on: ubuntu-latest
container:
image: barichello/godot-ci:4.1.1
strategy:
matrix:
channel: [win, linux, web, macOS]
env:
GAME: ##VAR_GAME_NAME
CHANNEL: ${{matrix.channel}}
GODOT_VERSION: 4.1
GAME_VERSION: ${{ github.event.inputs.message || GITHUB_REF_NAME }} # TODO: check if this works
steps:
- uses: actions/checkout@v3
with:
lfs: true
- name: Setup Templates
run: ./scripts/prepare-templates.sh $GODOT_VERSION
- name: Prepare Build
run: ./scripts/prepare-build.sh ${{env.GAME_VERSION}}
- name: Build
run: ./scripts/build-channel.sh $CHANNEL
- name: Publish Itch
if: env.BUTLER_API_KEY && env.USER && env.GAME && !contains(github.ref, '-rc')
shell: bash
env:
BUTLER_API_KEY: ${{secrets.BUTLER_API_KEY}}
USER: ${{secrets.ITCHIO_USER}}
run: butler push build/$CHANNEL $USER/$GAME:$CHANNEL --userversion ${{env.GAME_VERSION}}
- name: Package builds
if: env.CHANNEL != 'mac'
run: |
cd build
mv $CHANNEL $GAME && zip -r $GAME-$CHANNEL.zip $GAME
# Upload exported build
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: release
path: build/**/*.zip
github-release:
runs-on: ubuntu-latest
needs: release
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: 18
- run: echo "latest_tag=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
- run: echo "prev_tag=$(git tag | sort --version-sort | tail -n2 | head -1)" >> $GITHUB_ENV
- run: npm ci && npm run changelog -- -t ${{env.prev_tag}}..${{env.latest_tag}}
- uses: actions/download-artifact@v3
with:
name: release
- name: Release
uses: softprops/action-gh-release@v1
with:
body_path: CHANGELOG.md
prerelease: false
files: |
**/*.zip
**/*.aab