-
-
Notifications
You must be signed in to change notification settings - Fork 17
133 lines (130 loc) · 5.72 KB
/
main.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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
name: Prepare New Release
on:
push:
branches:
- main
jobs:
version_and_release:
runs-on: ubuntu-latest
name: Export Software
steps:
- name: "✔️ Checkout"
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: "📣 Release on push"
id: release
uses: rymndhng/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
bump_version_scheme: norelease
use_github_release_notes: true
# Always include the checkout step so that
# your project is available for Godot to export
- name: "✏️ Generate release changelog"
if: ${{ steps.release.outputs.version != '' }}
uses: heinrichreimer/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: "💾 Commit new version"
if: ${{ steps.release.outputs.version != '' }}
run: |
sed -i 's/VERSION := ".*"/VERSION := "${{ steps.release.outputs.version }}"/g' ./Consts.gd
sed -i 's/application\/file_version=".*"/application\/file_version="${{ steps.release.outputs.version }}"/g' ./export_presets.cfg
sed -i 's/application\/product_version=".*"/application\/product_version="${{ steps.release.outputs.version }}"/g' ./export_presets.cfg
sed -i 's/# Lucid-Creations \[.*\]/# Lucid-Creations [${{ steps.release.outputs.version }}]/g' README.md
git config user.email [email protected]
git config user.name github-actions
git commit -am 'version incremented'
git push
- name: "🤖 Export game"
id: export
if: ${{ steps.release.outputs.version != '' }}
uses: firebelley/[email protected]
with:
godot_executable_download_url: https://downloads.tuxfamily.org/godotengine/3.5/Godot_v3.5-stable_linux_headless.64.zip
godot_export_templates_download_url: https://downloads.tuxfamily.org/godotengine/3.5/Godot_v3.5-stable_export_templates.tpz
relative_project_path: ./
base_version: "${{ steps.release.outputs.version }}"
create_release: false
archive_output: true
export_debug: false
- name: "🛠 Prepare files for publishing"
if: ${{ steps.release.outputs.version != '' }}
shell: bash
run: |
mkdir -p build/StandaloneWindows64
mkdir -p build/StandaloneLinux64
cp '${{ steps.export.outputs.archive_directory }}/lucid-creations-windows.zip' .
unzip lucid-creations-windows.zip -d build/StandaloneWindows64
cp '${{ steps.export.outputs.archive_directory }}/lucid-creations-linux.zip' .
unzip lucid-creations-linux.zip -d build/StandaloneLinux64
cp '${{ steps.export.outputs.archive_directory }}/lucid-creations-macosx.zip' .
cp '${{ steps.export.outputs.archive_directory }}/HTML5.zip' .
ls -larth
ls -larth ${{ steps.export.outputs.archive_directory }}
ls -larth build
ls -larth build/*
- name: "☢ Upload Windows version to itch.io"
if: ${{ steps.release.outputs.version != '' }}
uses: josephbmanley/butler-publish-itchio-action@master
env:
BUTLER_CREDENTIALS: "${{ secrets.BUTLER_CREDENTIALS }}"
CHANNEL: windows
ITCH_GAME: lucid-creations
ITCH_USER: dbzer0
PACKAGE: lucid-creations-windows.zip
VERSION: "${{ steps.release.outputs.version }}"
- name: "🐧 Upload Linux version to itch.io"
if: ${{ steps.release.outputs.version != '' }}
uses: josephbmanley/butler-publish-itchio-action@master
env:
BUTLER_CREDENTIALS: ${{ secrets.BUTLER_CREDENTIALS }}
CHANNEL: linux
ITCH_GAME: lucid-creations
ITCH_USER: dbzer0
PACKAGE: lucid-creations-linux.zip
VERSION: "${{ steps.release.outputs.version }}"
- name: "☣ Upload OSX version to itch.io"
if: ${{ steps.release.outputs.version != '' }}
uses: josephbmanley/butler-publish-itchio-action@master
env:
BUTLER_CREDENTIALS: ${{ secrets.BUTLER_CREDENTIALS }}
CHANNEL: osx
ITCH_GAME: lucid-creations
ITCH_USER: dbzer0
PACKAGE: lucid-creations-macosx.zip
VERSION: "${{ steps.release.outputs.version }}"
- name: "🚀 Upload HTML5 version to itch.io"
if: ${{ steps.release.outputs.version != '' }}
uses: josephbmanley/butler-publish-itchio-action@master
env:
BUTLER_CREDENTIALS: "${{ secrets.BUTLER_CREDENTIALS }}"
CHANNEL: HTML5
ITCH_GAME: lucid-creations
ITCH_USER: dbzer0
PACKAGE: HTML5.zip
VERSION: "${{ steps.release.outputs.version }}"
# - name: "🔧 Publish all versions with Steamworks"
# if: ${{ steps.release.outputs.version != '' }}
# uses: game-ci/steam-deploy@v1
# with:
# username: ${{ secrets.STEAM_USERNAME }}
# password: ${{ secrets.STEAM_PASSWORD }}
# configVdf: ${{ secrets.STEAM_CONFIG_VDF}}
# ssfnFileName: ${{ secrets.STEAM_SSFN_FILE_NAME }}
# ssfnFileContents: ${{ secrets.STEAM_SSFN_FILE_CONTENTS }}
# appId: 2197290
# buildDescription: "${{ steps.release.outputs.version }}"
# # buildDescription: "${{ steps.release.outputs.version }}"
# rootPath: build
# depot1Path: StandaloneLinux64
# depot2Path: StandaloneWindows64
# releaseBranch: prerelease
- name: "Inform with Discord Webhook"
if: ${{ steps.release.outputs.version != '' }}
uses: tsickert/[email protected]
with:
webhook-url: ${{ secrets.DISCORD_WEBHOOK_URL }}
content: "New version of Lucid Creations has been published: https://github.com/Haidra-Org/Lucid-Creations/releases/tag/${{ steps.release.outputs.version }}"