-
Notifications
You must be signed in to change notification settings - Fork 414
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update build grpcwebproxy workflows.
- Loading branch information
Showing
4 changed files
with
45 additions
and
57 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,58 @@ | ||
name: Cross compile grpcwebproxy | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'grpcwebproxy*' | ||
workflow_dispatch: | ||
# push: | ||
# branches: | ||
# - main | ||
|
||
jobs: | ||
grpcwebproxy: | ||
|
||
name: Cross compile grpcwebproxy | ||
|
||
runs-on: ubuntu-20.04 | ||
|
||
releases-matrix: | ||
name: Release Go Binary | ||
runs-on: ubuntu-latest | ||
env: | ||
workdir: ./grpcwebproxy-source | ||
CGO_ENABLED: 0 | ||
BINARY: grpcwebproxy | ||
|
||
strategy: | ||
matrix: | ||
goos: [linux] | ||
goarch: ["386", amd64, arm64, arm, s390x, riscv64] | ||
# exclude: | ||
# - goarch: "386" | ||
# goos: darwin | ||
# - goarch: arm64 | ||
# goos: windows | ||
|
||
steps: | ||
- name: Checkout code | ||
- name: Git clone repository | ||
uses: actions/[email protected] | ||
with: | ||
repository: improbable-eng/grpc-web | ||
fetch-depth: 1 | ||
|
||
- name: Git clone grpcwebproxy | ||
run: | | ||
git clone https://github.com/improbable-eng/grpc-web.git ${{ env.workdir }} | ||
cp ./.github/grpcwebproxy-releaser.yml ${{ env.workdir }}/.goreleaser.yml | ||
- name: Set up GoReleaser | ||
uses: actions/[email protected] | ||
with: | ||
go-version: "1.21" | ||
|
||
- name: Run GoReleaser | ||
uses: goreleaser/[email protected] | ||
- uses: wangyoucao577/[email protected] | ||
with: | ||
distribution: goreleaser | ||
workdir: ${{ env.workdir }} | ||
version: latest | ||
args: release --rm-dist --snapshot | ||
|
||
- name: Release binaries | ||
uses: softprops/[email protected] | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
goos: ${{ matrix.goos }} | ||
goarch: ${{ matrix.goarch }} | ||
goversion: "1.21.5" | ||
project_path: "go/${{ env.BINARY }}" | ||
ldflags: -s -w --extldflags '-static -fpic' | ||
md5sum: "FALSE" | ||
release_tag: "${{ env.BINARY }}" | ||
release_name: "${{ env.BINARY }}" | ||
binary_name: "${{ env.BINARY }}" | ||
compress_assets: "AUTO" | ||
asset_name: "${{ env.BINARY }}-${{ matrix.goos }}-${{ matrix.goarch }}" | ||
|
||
- name: Delete old workflow runs | ||
uses: MajorScruffy/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: grpcwebproxy | ||
files: ${{ env.workdir }}/dist/*.tar.gz | ||
repository: ${{ github.repository }} | ||
older-than-seconds: 3600 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters