Skip to content

Merge pull request #58 from DireLines/main #83

Merge pull request #58 from DireLines/main

Merge pull request #58 from DireLines/main #83

Workflow file for this run

---
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-amd .
env GOOS=darwin GOARCH=amd64 go build -ldflags "-X 'main.Version=${{ steps.release.outputs.tag_name }}'" -o bin/runpodctl-darwin-amd .
env GOOS=darwin GOARCH=arm64 go build -ldflags "-X 'main.Version=${{ steps.release.outputs.tag_name }}'" -o bin/runpodctl-darwin-arm .
env GOOS=windows GOARCH=amd64 go build -ldflags "-X 'main.Version=${{ steps.release.outputs.tag_name }}'" -o bin/runpodctl-win-amd .
- 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-amd
asset_name: runpodctl-linux-amd
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-amd
asset_name: runpodctl-darwin-amd
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-arm
asset_name: runpodctl-darwin-arm
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-win-amd
asset_name: runpodctl-win-amd
asset_content_type: application/octet-stream