Skip to content

Commit 8da694d

Browse files
joelanfordankitathomas
authored andcommitted
remove darwin builds, disable goreleaser github releasers, re-add .github/workflows/release.yaml
Signed-off-by: Joe Lanford <[email protected]> Upstream-repository: operator-registry Upstream-commit: a629d38a2273aa0cd43b7f06702c8c631401f30c
1 parent 4900eb2 commit 8da694d

File tree

4 files changed

+51
-53
lines changed

4 files changed

+51
-53
lines changed

staging/operator-registry/.github/workflows/goreleaser.yaml

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -23,29 +23,6 @@ jobs:
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

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
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

staging/operator-registry/.goreleaser.yaml

Lines changed: 3 additions & 30 deletions
Original file line numberDiff line numberDiff 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
10779
archives:
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
11989
dockers:
@@ -171,3 +141,6 @@ snapshot:
171141
release:
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

vendor/github.com/operator-framework/operator-registry/pkg/lib/indexer/index.Dockerfile560629929

Whitespace-only changes.

0 commit comments

Comments
 (0)