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