v1.5.1 #36
Workflow file for this run
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
name: Package | |
on: | |
release: | |
types: [published] | |
jobs: | |
release: | |
name: Release polaris | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
goos: [linux] | |
goarch: [amd64, arm64] | |
exclude: | |
- goos: windows | |
goarch: arm64 | |
- goos: linux | |
goarch: arm64 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: "1.20" | |
- name: Get version | |
id: get_version | |
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//} | |
- name: Build | |
id: build | |
env: | |
GOOS: ${{ matrix.goos }} | |
GOARCH: ${{ matrix.goarch }} | |
VERSION: ${{ steps.get_version.outputs.VERSION }} | |
run: | | |
echo "version is $VERSION" | |
bash build_auto.sh $VERSION | |
PACKAGE_NAME=$(ls | grep polaris-sidecar-local*.zip | sed -n '1p') | |
echo ::set-output name=name::${PACKAGE_NAME} | |
- name: Upload asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ github.event.release.upload_url }} | |
asset_path: ./${{ steps.build.outputs.name }} | |
asset_name: ${{ steps.build.outputs.name }} | |
asset_content_type: application/gzip |