forked from agateau/pixelwheels
-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (54 loc) · 1.74 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
name: main
on:
pull_request:
push:
branches:
# Only build on push for master or dev, otherwise branches pushed for PR
# are built twice
- master
- dev
workflow_dispatch:
jobs:
lint:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Install pre-commit
run: pipx install pre-commit
- name: Install dependencies
run: |
pip install -r requirements.txt
sudo apt-get update
sudo apt-get install -y gettext libxml2-utils
tools/apply-codingstyle --download-only
- name: Run pre-commit
run: pre-commit run --all
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Build Docker image
run: ci/build-docker-image
shell: bash
- name: Build
shell: bash
run: ci/docker-build-game SNAPSHOT=1
env:
KEYSTORE_BASE64: ${{ secrets.KEYSTORE_BASE64 }}
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
KEYSTORE_KEY_ALIAS: ${{ secrets.KEYSTORE_KEY_ALIAS }}
KEYSTORE_KEY_PASSWORD: ${{ secrets.KEYSTORE_KEY_PASSWORD }}
- name: Smoke tests
uses: GabrielBB/xvfb-action@v1
with:
run: make smoke-tests SNAPSHOT=1
- name: Upload
# Do not upload for pull requests: `make upload` does not work without the upload secrets
if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }}
run: make upload SNAPSHOT=1
env:
UPLOAD_USERNAME: ${{ secrets.UPLOAD_USERNAME }}
UPLOAD_PRIVATE_KEY: ${{ secrets.UPLOAD_PRIVATE_KEY }}
UPLOAD_HOSTNAME: ${{ secrets.UPLOAD_HOSTNAME }}