Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: combined release process #121

Merged
merged 3 commits into from
Feb 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 0 additions & 32 deletions .github/workflows/brew.yml

This file was deleted.

32 changes: 14 additions & 18 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@ name: release

on:
push:
branches:
- main
tags:
- "*"

permissions:
contents: write

jobs:
release:
Expand All @@ -13,22 +16,12 @@ jobs:
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 .
Expand All @@ -38,7 +31,6 @@ jobs:
# env GOOS=android GOARCH=amd64 go build -ldflags "-X 'main.Version=${{ steps.release.outputs.tag_name }}'" -o bin/runpodctl-android-amd64 .

- name: upload linux amd64 release binary
if: ${{ steps.release.outputs.release_created }}
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ github.token }}
Expand All @@ -48,7 +40,6 @@ jobs:
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 }}
Expand All @@ -59,7 +50,6 @@ jobs:
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 }}
Expand All @@ -70,7 +60,6 @@ jobs:
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 }}
Expand All @@ -79,8 +68,16 @@ jobs:
asset_path: bin/runpodctl-windows-amd64.exe
asset_name: runpodctl-windows-amd64.exe
asset_content_type: application/octet-stream
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
distribution: goreleaser
version: latest
args: release --clean
ldflags: "-X 'main.Version=${{ steps.release.outputs.tag_name }}'"
env:
GITHUB_TOKEN: ${{ secrets.PUBLISHER_TOKEN }}
# - name: upload linux arm64 release binary
# if: ${{ steps.release.outputs.release_created }}
# uses: actions/[email protected]
# env:
# GITHUB_TOKEN: ${{ github.token }}
Expand All @@ -90,7 +87,6 @@ jobs:
# asset_name: runpodctl-linux-arm64
# asset_content_type: application/octet-stream
# - name: upload android amd64 release binary
# if: ${{ steps.release.outputs.release_created }}
# uses: actions/[email protected]
# env:
# GITHUB_TOKEN: ${{ github.token }}
Expand Down