-
Notifications
You must be signed in to change notification settings - Fork 3
102 lines (84 loc) · 3.01 KB
/
release.yaml
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
name: Release
on:
release:
types:
- published
jobs:
osx:
runs-on: macos-latest
steps:
- name: Get tag name
id: tagName
run: |
TAG=${GITHUB_REF##*/}
echo ::set-output name=tag::${TAG}
- name: build
run: |
set -x
brew install oras
# homebrew doesn't use v, just a number triplet
_version=${{ steps.tagName.outputs.tag }}
_version=${_version:1}
echo ref ${GITHUB_REF}
echo ref_name ${GITHUB_REF_NAME}
# AMD64 is not supported beyond 12.6
oras pull ghcr.io/homebrew/core/envoy:${_version} --platform "darwin/amd64:macOS 12.6"
tar --extract \
--file envoy--${_version}.monterey.bottle.tar.gz \
--directory . \
--strip-components=3 \
envoy/${_version}/bin/envoy
mv -f envoy envoy-darwin-amd64
oras pull ghcr.io/homebrew/core/envoy:${_version} --platform "darwin/arm64:macOS 13"
tar --extract \
--file envoy--${_version}.arm64_ventura.bottle.tar.gz \
--directory . \
--strip-components=3 \
envoy/${_version}/bin/envoy
mv -f envoy envoy-darwin-arm64
shasum -a 256 envoy-darwin-amd64 > envoy-darwin-amd64.sha256
shasum -a 256 envoy-darwin-arm64 > envoy-darwin-arm64.sha256
- name: Upload artifacts to release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release -R pomerium/envoy-binaries upload ${{ steps.tagName.outputs.tag }} envoy-darwin-*
linux:
runs-on: ubuntu-latest
env:
DOCKER_CLI_EXPERIMENTAL: "enabled"
steps:
- name: Checkout
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
- name: Set up Go
uses: actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9
with:
go-version: 1.18.x
# We need api 1.41 to override platform
- name: Install docker stable
uses: docker-practice/actions-setup-docker@5d9a5f65f510c01ec5f0bd81d5c95768b1ec032a
with:
docker_channel: stable
docker_version: 20.10
- name: Set up Docker
run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
- name: Get tag name
id: tagName
run: |
TAG=${GITHUB_REF##*/}
echo ::set-output name=tag::${TAG}
- name: Run fetchenvoy
working-directory: fetchenvoy
run: |
go run . ${{steps.tagName.outputs.tag}}
- name: shasum
working-directory: fetchenvoy
run: |
shasum -a 256 envoy-linux-amd64 > envoy-linux-amd64.sha256
shasum -a 256 envoy-linux-arm64 > envoy-linux-arm64.sha256
- name: Upload artifacts to release
working-directory: fetchenvoy
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release upload ${{ steps.tagName.outputs.tag }} envoy-*