-
Notifications
You must be signed in to change notification settings - Fork 51
107 lines (103 loc) · 2.85 KB
/
builds.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
name: builds
on:
push: {}
pull_request: {}
jobs:
build_windows:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
version:
- "-win32"
- "-win64"
steps:
- name: checkout Xiphos
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: fetch history
run: |
git fetch origin +refs/tags/*:refs/tags/*
- name: build windows targets
shell: bash
id: build
run: |
set -ex -o pipefail
docker build -t xiphos win32
docker run -i --rm -v "$(pwd):/source" xiphos ${{ matrix.version }}
- name: upload artifact
uses: actions/upload-artifact@v2
with:
name: windows-installers
path: "*.exe"
build_linux:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
distro:
- archlinux:latest
- fedora:latest
- debian:latest
- ubuntu:latest
steps:
- name: checkout xiphos
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: fetch tags
run: git fetch --tags
- name: install python
uses: actions/setup-python@v1
- name: install python packages
run: |
set -ex
python -m pip install -U pip
pip install -U PyGithub setuptools PyYAML
- name: execute build
id: build
run: |
set -ex
curl -Ls -o docker-build https://github.com/mate-desktop/mate-dev-scripts/raw/master/travis/docker-build
chmod +x docker-build
python docker-build --name ${{ matrix.distro }} --config .ci-build.yml --install
python docker-build --name ${{ matrix.distro }} -vvvv --config .ci-build.yml --build scripts
env:
TEMP: ${{ runner.temp }}
- name: upload source tarball
uses: actions/upload-artifact@v2
with:
name: source
path: build/*.tar.gz
- name: upload source zipfile
uses: actions/upload-artifact@v2
with:
name: source
path: build/*.tar.gz
deploy:
needs:
- build_windows
- build_linux
if: contains(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
- name: download all the artifacts
uses: actions/download-artifact@v2
- name: prepare for release
id: release
run: |
set -ex
ls -R
cd source
gunzip -k *.tar.gz
xz *.tar
cd ..
echo ::set-output name=tag::${GITHUB_REF#refs/tags/}
- name: create release
uses: ncipollo/release-action@v1.6.1
with:
artifacts: source/*,windows-installers/*
allowUpdates: true
name: Release ${{ steps.release.outputs.tag }}
token: ${{ secrets.GITHUB_TOKEN }}