Merge pull request #71 from justinmerrell/readme-update #92
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: runpod | |
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/runpod-linux-amd64 . | |
env GOOS=darwin GOARCH=amd64 go build -ldflags "-X 'main.Version=${{ steps.release.outputs.tag_name }}'" -o bin/runpod-darwin-amd64 . | |
env GOOS=darwin GOARCH=arm64 go build -ldflags "-X 'main.Version=${{ steps.release.outputs.tag_name }}'" -o bin/runpod-darwin-arm64 . | |
env GOOS=windows GOARCH=amd64 go build -ldflags "-X 'main.Version=${{ steps.release.outputs.tag_name }}'" -o bin/runpod-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/runpod-linux-amd64 | |
asset_name: runpod-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/runpod-darwin-amd64 | |
asset_name: runpod-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/runpod-darwin-arm64 | |
asset_name: runpod-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/runpod-windows-amd64.exe | |
asset_name: runpod-windows-amd64.exe | |
asset_content_type: application/octet-stream |