-
Notifications
You must be signed in to change notification settings - Fork 0
/
.woodpecker.yml
128 lines (128 loc) · 5.34 KB
/
.woodpecker.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
pipeline:
build-icons:
image: alpine
commands:
- apk add just imagemagick
- just build-icons
when:
event: tag
archive-icons:
image: alpine
commands:
- apk add tar
- tar czf icons.tar.gz --directory=build icons
when:
event: tag
godot-build-linux:
image: barichello/godot-ci
commands:
- mkdir -v -p godot-build
- godot -v --export "Linux/X11" godot-build/Dinonuggy\'s\ Journey\ for\ Linux\ ${CI_COMMIT_TAG}.x86_64
- ls godot-build
when:
event: tag
godot-build-windows:
image: barichello/godot-ci
commands:
- mkdir -v -p godot-build
- godot -v --export "Windows Desktop" godot-build/Dinonuggy\'s\ Journey\ for\ Windows\ ${CI_COMMIT_TAG}.exe
- ls godot-build
when:
event: tag
godot-build-mac:
image: barichello/godot-ci
commands:
- mkdir -v -p godot-build
- godot -v --export "Mac OSX" godot-build/Dinonuggy\'s\ Journey\ for\ Mac\ OSX\ ${CI_COMMIT_TAG}.zip
- ls godot-build
when:
event: tag
godot-build-web:
image: barichello/godot-ci
commands:
- mkdir -v -p godot-build/Dinonuggy\'s\ Journey\ for\ Web\ ${CI_COMMIT_TAG}
- godot -v --export "HTML5" godot-build/Dinonuggy\'s\ Journey\ for\ Web\ ${CI_COMMIT_TAG}/index.html
- zip godot-build/Dinonuggy\'s\ Journey\ for\ Web\ ${CI_COMMIT_TAG}.zip godot-build/Dinonuggy\'s\ Journey\ for\ Web\ ${CI_COMMIT_TAG}/*
- rm -rf godot-build/Dinonuggy\'s\ Journey\ for\ Web\ ${CI_COMMIT_TAG}
- ls godot-build
when:
event: tag
# Android Debug Job. It will use the generated debug.keystore.
#debug-android:
# image: barichello/godot-ci
# commands:
# - mkdir -v -p godot-build/android
# - godot -v --export-debug "Android Debug" godot-build/Dinonuggy\'s\ Journey\ for\ Android\ ${CI_COMMIT_TAG}.apk
# Android Release Job. You will need to include keystore and password in the Codeberg CI secrets:
# 1. Take your generated keystore and convert it to Base64:
# Linux & macOS: `base64 release.keystore -w 0`
# Windows: `certutil -encodehex -f release.keystore encoded.txt 0x40000001`
# 2. Go to Codeberg CI > Repository > Settings > Secrets and copy the Base64-encoded keystore value in a new secret named `secret_release_keystore_base64`.
# 3. Create a second secret named `secret_release_keystore_user` with the alias of your keystore as value.
# 4. Create a third secret named `secret_release_keystore_password` with the password of your keystore as value.
# when:
# event: tag
#godot-build-android:
# secrets: [ secret_release_keystore_base64, secret_release_keystore_user, secret_release_keystore_password ]
# image: barichello/godot-ci
# commands:
# - echo $${SECRET_RELEASE_KEYSTORE_BASE64} | base64 --decode > /root/release.keystore
# - ls /root/
# - ls /root/ | grep -i release
# - sed 's@keystore/debug=".*"@keystore/debug="'/root/release.keystore'"@g' -i export_presets.cfg
# - sed 's@keystore/debug_user=".*"@keystore/debug_user="'$${SECRET_RELEASE_KEYSTORE_USER}'"@g' -i export_presets.cfg
# - sed 's@keystore/debug_password=".*"@keystore/debug_password="'$${SECRET_RELEASE_KEYSTORE_PASSWORD}'"@g' -i export_presets.cfg
# - sed 's@keystore/release=".*"@keystore/release="'/root/release.keystore'"@g' -i export_presets.cfg
# - sed 's@keystore/release_user=".*"@keystore/release_user="'$${SECRET_RELEASE_KEYSTORE_USER}'"@g' -i export_presets.cfg
# - sed 's@keystore/release_password=".*"@keystore/release_password="'$${SECRET_RELEASE_KEYSTORE_PASSWORD}'"@g' -i export_presets.cfg
# - godot -v --export "Android" godot-build/Dinonuggy\'s\ Journey\ for\ Android\ ${CI_COMMIT_TAG}.apk
# - ls godot-build
# when:
# event: tag
godot-build-linux-pack:
image: barichello/godot-ci
commands:
- mkdir -v -p godot-build
- godot -v --export-pack "Linux/X11" godot-build/godot-runner.pck
- ls godot-build
when:
event: tag
gitea-release:
image: plugins/gitea-release
secrets: [ codeberg_access_token ]
settings:
api_key:
from_secret: codeberg_access_token
base_url: https://codeberg.org
files:
- godot-build/*
- icons.tar.gz
checksum:
- sha256
- sha512
title: ${CI_COMMIT_TAG}
note: ${CI_REPO_LINK}/src/branch/main/CHANGELOG.md#${CI_COMMIT_TAG/\./-}
when:
event: tag
path:
exclude: [ '*.md', '.chglog/**' ]
deploy-web:
image: alpine
secrets: [ codeberg_access_token ]
commands:
- apk add git unzip rsync
# clone pages repository
- git clone https://"$${CODEBERG_ACCESS_TOKEN}"@codeberg.org/${CI_REPO_OWNER}/pages.git /pages
# unzip web version
- unzip godot-build/Dinonuggy\'s\ Journey\ for\ Web\ ${CI_COMMIT_TAG}.zip -d godot-build/Dinonuggy\'s\ Journey\ for\ Web\ ${CI_COMMIT_TAG}/
- rsync -r --delete --exclude-from=".rsyncignore" godot-build/Dinonuggy\'s\ Journey\ for\ Web\ ${CI_COMMIT_TAG}/godot-build/Dinonuggy\'s\ Journey\ for\ Web\ ${CI_COMMIT_TAG}/ /pages
# configure git
- git config --global user.email "[email protected]"
- git config --global user.name "Codeberg CI"
# deploy web version
- cd /pages
- git add -A
- >
git commit -m 'chore: update website from upstream to ${CI_COMMIT_TAG}' ; git push
when:
event: tag