Skip to content

Commit 901b2df

Browse files
authored
Merge pull request #1 from pygame-web/ci-releases-and-updates
Minor CI updates, add releases to CI
2 parents 02c11f3 + 3f6baf3 commit 901b2df

File tree

1 file changed

+47
-21
lines changed

1 file changed

+47
-21
lines changed

.github/workflows/ci.yml

Lines changed: 47 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,58 @@
11
name: CI
22

3-
on: [push, workflow_dispatch]
3+
on:
4+
release:
5+
# this runs CI only when a release is created at first (and not when it is
6+
# edited or published)
7+
types: [created]
8+
9+
push:
10+
branches: main
11+
12+
pull_request:
13+
branches: main
14+
15+
workflow_dispatch
416

517
jobs:
618
build:
719
runs-on: ubuntu-latest
20+
821
steps:
922
- uses: actions/checkout@v1
10-
- name: python-wasm-builder prepare
23+
24+
- name: Display CI properties
1125
run: |
12-
WD=$(pwd)
13-
python3 -V
14-
echo $WD
15-
clang --version | head -n 1
16-
echo
17-
gcc --version | head -n 1
18-
echo
19-
env|grep GITHUB
20-
echo
21-
grep "^Pkg.Revision =" ${ANDROID_HOME}/ndk-bundle/source.properties
22-
sudo apt-get update
23-
# git clang libffi-dev libssl-dev zlib1g-dev libncursesw5-dev make
24-
sudo apt-get install -y bash wget
25-
cd $GITHUB_WORKSPACE
26-
time bash ./python-wasm-sdk.sh
27-
28-
- name: Package SDK
26+
WD=$(pwd)
27+
python3 -V
28+
echo $WD
29+
clang --version | head -n 1
30+
echo
31+
gcc --version | head -n 1
32+
echo
33+
env|grep GITHUB
34+
echo
35+
grep "^Pkg.Revision =" ${ANDROID_HOME}/ndk-bundle/source.properties
36+
37+
- name: Install dependencies
38+
run: |
39+
sudo apt-get update --fix-missing
40+
# git clang libffi-dev libssl-dev zlib1g-dev libncursesw5-dev make
41+
sudo apt-get install -y bash wget
42+
43+
- name: Build sdk
44+
run: bash ./python-wasm-sdk.sh
45+
46+
- name: Upload sdk to Github artifacts
2947
uses: actions/upload-artifact@v2
3048
with:
31-
name: sdk
32-
path: /home/runner/work/python-wasm-sdk/python-wasm-sdk/sdk
49+
path: ./sdk
50+
51+
- name: Upload sdk to Github Releases
52+
if: github.event_name == 'release'
53+
uses: svenstaro/upload-release-action@v2.2.1
54+
with:
55+
repo_token: ${{ secrets.GITHUB_TOKEN }}
56+
file: ./sdk/*
57+
file_glob: true
58+
tag: ${{ github.ref }}

0 commit comments

Comments
 (0)