github.com/polarismesh/polaris@v1.17.8/.github/workflows/standalone.yml (about) 1 # Tencent is pleased to support the open source community by making Polaris available. 2 # 3 # Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. 4 # 5 # Licensed under the BSD 3-Clause License (the "License"); 6 # you may not use this file except in compliance with the License. 7 # You may obtain a copy of the License at 8 # 9 # https://opensource.org/licenses/BSD-3-Clause 10 # 11 # Unless required by applicable law or agreed to in writing, software distributed 12 # under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 13 # CONDITIONS OF ANY KIND, either express or implied. See the License for the 14 # specific language governing permissions and limitations under the License. 15 16 name: Standalone 17 18 on: 19 workflow_dispatch: 20 inputs: 21 server_version: 22 description: "tag version for polaris" 23 required: true 24 console_version: 25 description: "tag version for polaris-console" 26 required: true 27 limiter_version: 28 description: "tag version for polaris-limiter" 29 required: true 30 31 jobs: 32 release: 33 name: Release polaris standalone 34 runs-on: ubuntu-latest 35 strategy: 36 matrix: 37 goos: [ linux, windows, darwin, kubernetes ] 38 goarch: [ amd64, arm64 ] 39 exclude: 40 - goos: windows 41 goarch: arm64 42 - goos: kubernetes 43 goarch: arm64 44 45 steps: 46 - name: Checkout code 47 uses: actions/checkout@v2 48 with: 49 ref: ${{ github.event.inputs.server_version }} 50 51 - name: Setup Go 52 uses: actions/setup-go@v4 53 with: 54 go-version: "1.20" 55 56 - name: Build 57 id: build 58 env: 59 GOOS: ${{ matrix.goos }} 60 GOARCH: ${{ matrix.goarch }} 61 SERVER_VERSION: ${{ github.event.inputs.server_version }} 62 CONSOLE_VERSION: ${{ github.event.inputs.console_version }} 63 LIMITER_VERSION: ${{ github.event.inputs.limiter_version }} 64 run: | 65 set -e 66 workdir=$(pwd) 67 cd ${workdir} 68 export WORKDIR=${workdir} 69 ls -lstrh 70 bash release/standalone/build_standalone.sh 71 72 73 - name: Get Release by Tag 74 id: get_release_by_tag 75 uses: jonfriesen/get-release-by-tag@v0.0.11 76 env: 77 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 78 with: 79 tag_name: ${{ github.event.inputs.server_version }} 80 81 # - name: Upload asset 82 # uses: actions/upload-release-asset@v1 83 # env: 84 # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 85 # with: 86 # upload_url: ${{ steps.get_release_by_tag.outputs.upload_url }} 87 # asset_path: ./${{ steps.build.outputs.name }} 88 # asset_name: ${{ steps.build.outputs.name }} 89 # asset_content_type: application/gzip 90 - name: Upload 91 env: 92 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 93 SERVER_VERSION: ${{ github.event.inputs.server_version }} 94 run: | 95 hub release edit $(find . -type f -name "polaris-*.zip" -printf "-a %p ") -m "" "${SERVER_VERSION}"