|
| 1 | +on: |
| 2 | + release: |
| 3 | + types: |
| 4 | + - created |
| 5 | + |
| 6 | +name: Build Release |
| 7 | +jobs: |
| 8 | + release-linux-amd64: |
| 9 | + name: x86_64 Linux release |
| 10 | + runs-on: ubuntu-latest |
| 11 | + steps: |
| 12 | + - uses: actions/checkout@v2 |
| 13 | + - uses: actions/setup-go@v2 |
| 14 | + with: |
| 15 | + go-version: '^1.15' # The Go version to download (if necessary) and use. - name: compile and release |
| 16 | + - run: go build -v -o cloud-agent-linux-amd64 |
| 17 | + env: |
| 18 | + GOARCH: amd64 |
| 19 | + GOOS: linux |
| 20 | + - run: hub release edit -m "" -a ./cloud-agent-linux-amd64 $(echo $GITHUB_REF | cut -d/ -f3) |
| 21 | + env: |
| 22 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 23 | + |
| 24 | + release-linux-arm64: |
| 25 | + name: ARM64 Linux release |
| 26 | + runs-on: ubuntu-latest |
| 27 | + steps: |
| 28 | + - uses: actions/checkout@v2 |
| 29 | + - uses: actions/setup-go@v2 |
| 30 | + with: |
| 31 | + go-version: '^1.15' # The Go version to download (if necessary) and use. - name: compile and release |
| 32 | + - run: go build -v -o cloud-agent-linux-arm64 |
| 33 | + env: |
| 34 | + GOARCH: arm64 |
| 35 | + GOOS: linux |
| 36 | + - run: hub release edit -m "" -a ./cloud-agent-linux-arm64 $(echo $GITHUB_REF | cut -d/ -f3) |
| 37 | + env: |
| 38 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 39 | + |
| 40 | + release-macos-amd64: |
| 41 | + name: x86_64 macOS release |
| 42 | + runs-on: ubuntu-latest |
| 43 | + steps: |
| 44 | + - uses: actions/checkout@v2 |
| 45 | + - uses: actions/setup-go@v2 |
| 46 | + with: |
| 47 | + go-version: '^1.15' # The Go version to download (if necessary) and use. - name: compile and release |
| 48 | + - run: go build -v -o cloud-agent-macos-amd64 |
| 49 | + env: |
| 50 | + GOARCH: amd64 |
| 51 | + GOOS: darwin |
| 52 | + - run: hub release edit -m "" -a ./cloud-agent-macos-amd64 $(echo $GITHUB_REF | cut -d/ -f3) |
| 53 | + env: |
| 54 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 55 | + |
| 56 | + release-macos-arm64: |
| 57 | + name: ARM64 macOS release |
| 58 | + runs-on: ubuntu-latest |
| 59 | + steps: |
| 60 | + - uses: actions/checkout@v2 |
| 61 | + - uses: actions/setup-go@v2 |
| 62 | + with: |
| 63 | + go-version: '^1.15' # The Go version to download (if necessary) and use. - name: compile and release |
| 64 | + - run: go build -v -o cloud-agent-macos-arm64 |
| 65 | + env: |
| 66 | + GOARCH: arm64 |
| 67 | + GOOS: darwin |
| 68 | + - run: hub release edit -m "" -a ./cloud-agent-macos-arm64 $(echo $GITHUB_REF | cut -d/ -f3) |
| 69 | + env: |
| 70 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
0 commit comments