Merge pull request #77 from justinmerrell/starter-examples #96
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: release | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
release: | |
concurrency: main | |
name: release | |
runs-on: ubuntu-latest | |
steps: | |
- uses: google-github-actions/release-please-action@v3 | |
id: release | |
with: | |
release-type: go | |
package-name: runpodctl | |
pull-request-title-pattern: release${component} ${version} | |
- uses: actions/checkout@v2 | |
if: ${{ steps.release.outputs.release_created }} | |
- uses: actions/setup-go@v2 | |
if: ${{ steps.release.outputs.release_created }} | |
with: | |
go-version: 1.17 | |
- name: build | |
if: ${{ steps.release.outputs.release_created }} | |
run: | | |
env GOOS=linux GOARCH=amd64 go build -ldflags "-X 'main.Version=${{ steps.release.outputs.tag_name }}'" -o bin/runpodctl-linux-amd64 . | |
env GOOS=darwin GOARCH=amd64 go build -ldflags "-X 'main.Version=${{ steps.release.outputs.tag_name }}'" -o bin/runpodctl-darwin-amd64 . | |
env GOOS=darwin GOARCH=arm64 go build -ldflags "-X 'main.Version=${{ steps.release.outputs.tag_name }}'" -o bin/runpodctl-darwin-arm64 . | |
env GOOS=windows GOARCH=amd64 go build -ldflags "-X 'main.Version=${{ steps.release.outputs.tag_name }}'" -o bin/runpodctl-windows-amd64.exe . | |
- name: upload linux amd64 release binary | |
if: ${{ steps.release.outputs.release_created }} | |
uses: actions/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
with: | |
upload_url: ${{ steps.release.outputs.upload_url }} | |
asset_path: bin/runpodctl-linux-amd64 | |
asset_name: runpodctl-linux-amd64 | |
asset_content_type: application/octet-stream | |
- name: upload darwin amd64 release binary | |
if: ${{ steps.release.outputs.release_created }} | |
uses: actions/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
with: | |
upload_url: ${{ steps.release.outputs.upload_url }} | |
asset_path: bin/runpodctl-darwin-amd64 | |
asset_name: runpodctl-darwin-amd64 | |
asset_content_type: application/octet-stream | |
- name: upload darwin arm64 release binary | |
if: ${{ steps.release.outputs.release_created }} | |
uses: actions/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
with: | |
upload_url: ${{ steps.release.outputs.upload_url }} | |
asset_path: bin/runpodctl-darwin-arm64 | |
asset_name: runpodctl-darwin-arm64 | |
asset_content_type: application/octet-stream | |
- name: upload windows amd64 release binary | |
if: ${{ steps.release.outputs.release_created }} | |
uses: actions/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
with: | |
upload_url: ${{ steps.release.outputs.upload_url }} | |
asset_path: bin/runpodctl-windows-amd64.exe | |
asset_name: runpodctl-windows-amd64.exe | |
asset_content_type: application/octet-stream |