File tree Expand file tree Collapse file tree 3 files changed +51
-53
lines changed Expand file tree Collapse file tree 3 files changed +51
-53
lines changed Original file line number Diff line number Diff line change 2323 with :
2424 go-version : ' ~1.16'
2525
26- - name : " Download osxcross cross-compiler for macOS builds"
27- run : |
28- git clone https://github.com/tpoechtrager/osxcross /tmp/osxcross
29- cd /tmp/osxcross
30- wget -P tarballs '<REPLACE_ME_WITH_SECRET_PATH_TO_MACOS_SDK>'
31- echo "/tmp/osxcross/target/bin" >> $GITHUB_PATH
32-
33- - name : " Cache the osxcross + tarball build output"
34- id : cache-osxcross
35- uses : actions/cache@v2
36- with :
37- path : /tmp/osxcross/target
38- key : ${{ runner.os }}-osxcross-${{ hashFiles('/tmp/osxcross/**/*') }}
39- restore-keys : |
40- ${{ runner.os }}-osxcross-
41-
42- - name : " Build osxcross"
43- if : steps.cache-osxcross.outputs.cache-hit != 'true'
44- run : |
45- cd /tmp/osxcross
46- sudo ./tools/get_dependencies.sh
47- UNATTENDED=1 ./build.sh
48-
4926 - name : " Install linux cross-compilers"
5027 run : sudo apt-get install -y gcc-aarch64-linux-gnu gcc-s390x-linux-gnu gcc-powerpc64le-linux-gnu gcc-mingw-w64-x86-64
5128
Original file line number Diff line number Diff line change 1+ name : release
2+ on :
3+ push :
4+ tags :
5+ - ' v[0-9]+.[0-9]+.[0-9]+'
6+ defaults :
7+ run :
8+ shell : bash
9+ jobs :
10+ create :
11+ runs-on : ubuntu-latest
12+ outputs :
13+ upload_url : ${{ steps.release.outputs.upload_url }}
14+ steps :
15+ - uses : actions/create-release@v1
16+ id : release
17+ env :
18+ GITHUB_TOKEN : ${{ github.token }}
19+ with :
20+ draft : true
21+ tag_name : ${{ github.ref }}
22+ release_name : ${{ github.ref }}
23+ assets :
24+ needs : create
25+ strategy :
26+ matrix :
27+ os :
28+ - ubuntu-latest
29+ - macos-latest
30+ - windows-latest
31+ runs-on : ${{ matrix.os }}
32+ steps :
33+ - uses : actions/checkout@v2
34+ - uses : actions/setup-go@v2
35+ with :
36+ go-version : ' ~1.16'
37+ - run : |
38+ echo "asset_path=bin/opm" >> $GITHUB_ENV
39+ echo "asset_name=$(go env GOOS)-$(go env GOARCH)-opm$(go env GOEXE)" >> $GITHUB_ENV
40+ - run : make ${{ env.asset_path }}
41+ - uses : actions/upload-release-asset@v1
42+ env :
43+ GITHUB_TOKEN : ${{ github.token }}
44+ with :
45+ upload_url : ${{ needs.create.outputs.upload_url }}
46+ asset_path : ${{ env.asset_path }}
47+ asset_name : ${{ env.asset_name }}
48+ asset_content_type : application/octet-stream
Original file line number Diff line number Diff line change @@ -76,34 +76,6 @@ builds:
7676 asmflags : *build-asmflags
7777 gcflags : *build-gcflags
7878 ldflags : *build-ldflags
79- - id : darwin-amd64
80- main : ./cmd/opm
81- binary : opm
82- goos :
83- - darwin
84- goarch :
85- - amd64
86- env :
87- - CC=o64-clang
88- mod_timestamp : " {{ .CommitTimestamp }}"
89- flags : *build-flags
90- asmflags : *build-asmflags
91- gcflags : *build-gcflags
92- ldflags : *build-ldflags
93- - id : darwin-arm64
94- main : ./cmd/opm
95- binary : opm
96- goos :
97- - darwin
98- goarch :
99- - arm64
100- env :
101- - CC=oa64e-clang
102- mod_timestamp : " {{ .CommitTimestamp }}"
103- flags : *build-flags
104- asmflags : *build-asmflags
105- gcflags : *build-gcflags
106- ldflags : *build-ldflags
10779archives :
10880 - id : opm
10981 builds :
@@ -112,8 +84,6 @@ archives:
11284 - linux-ppc64le
11385 - linux-s390x
11486 - windows-amd64
115- - darwin-amd64
116- - darwin-arm64
11787 name_template : " {{ .Binary }}_{{ .Env.OPM_VERSION }}_{{ .Os }}_{{ .Arch }}"
11888 format : binary
11989dockers :
@@ -171,3 +141,6 @@ snapshot:
171141release :
172142 name_template : " {{ .Env.OPM_VERSION }}"
173143 draft : true
144+ # # Disable release steps, since a separate GitHub Action job
145+ # # handles binary builds and release uploads
146+ disable : true
You can’t perform that action at this time.
0 commit comments