@@ -2,41 +2,58 @@ name: build
2
2
3
3
on :
4
4
workflow_dispatch :
5
- # push:
5
+ inputs :
6
+ uploadRelease :
7
+ description : " Create Github Release"
8
+ type : boolean
9
+ tag :
10
+ description : " Github release tag"
6
11
7
12
jobs :
8
- linux :
9
- runs-on : ubuntu-latest
13
+ generate_toolchain :
10
14
strategy :
11
15
fail-fast : false
12
16
matrix :
13
17
arch : [focal-x64, bionic-arm64, bionic-armhf, centos7-devtoolset8-x64, centos7-devtoolset8-arm64]
14
18
include :
15
- - arch : centos7-devtoolset8-arm64
16
- qemu : true
19
+ - arch : amd64
20
+ config : x86_64-gcc-8.5.0-glibc-2.28.config
21
+ pkg : x86_64-linux-gnu
22
+ - arch : arm64
23
+ config : aarch64-gcc-8.5.0-glibc-2.28.config
24
+ pkg : aarch64-linux-gnu
25
+ - arch : armhf
26
+ config : armhf-gcc-8.5.0-glibc-2.28.config
27
+ pkg : arm-rpi-linux-gnueabihf
28
+ uses : ./.github/workflows/build-toolchain.yml
29
+ with :
30
+ config : ${{ matrix.config }}
31
+ arch : ${{ matrix.arch }}
32
+ pkg : ${{ matrix.pkg }}
17
33
34
+ release_toolchain :
35
+ if : github.event.inputs.uploadRelease == 'true'
36
+ runs-on : ubuntu-latest
37
+ needs : generate_toolchain
18
38
steps :
19
- - uses : actions/checkout@v3
39
+ - uses : actions/download-artifact@v3
40
+ with :
41
+ path : artifacts/
20
42
21
- - name : Set up QEMU
22
- uses : docker/setup-qemu-action@v2
23
- if : matrix.qemu == true
43
+ - run : |
44
+ mkdir upload
24
45
25
- - name : Set up Docker Buildx
26
- uses : docker/setup-buildx-action@v2
27
- with :
28
- install : true
46
+ cp artifacts/amd64/x86_64-linux-gnu.tar.gz upload/x86_64-linux-gnu.tar.gz
47
+ cp artifacts/arm64/aarch64-linux-gnu.tar.gz upload/aarch64-linux-gnu.tar.gz
48
+ cp artifacts/armhf/arm-rpi-linux-gnueabihf.tar.gz upload/arm-rpi-linux-gnueabihf.tar.gz
29
49
30
- - name : Login to DockerHub
31
- uses : docker/login-action@v2
32
- with :
33
- username : ${{ secrets.DOCKERHUB_USERNAME }}
34
- password : ${{ secrets.DOCKERHUB_TOKEN }}
50
+ cd upload
51
+ shasum -a 256 *.tar.gz > SHASUMS256.txt
35
52
36
- - name : Build and push
37
- uses : docker/build-push-action@v4
53
+ - name : Create GitHub Release
54
+ uses : softprops/action-gh-release@v1
38
55
with :
39
- context : ${{ matrix.arch }}
40
- file : ${{ matrix.arch }}/Dockerfile
41
- tags : gitpod/openvscode-server-linux-build-agent: ${{ matrix.arch }}
42
- push : ${{ github.ref == 'refs/heads/main' }}
56
+ repository : ${{ github.repository_owner }}/vscode-linux-build-agent
57
+ tag_name : ${{ inputs.tag }}
58
+ token : ${{ secrets.VSCODE_GITHUB_TOKEN }}
59
+ files : upload/*
0 commit comments