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

TT-10430: fix release pipelines #55

Merged
merged 1 commit into from
Nov 16, 2023
Merged
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
37 changes: 14 additions & 23 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ name: Draft release

on:
push:
branches:
- wftest/*
tags:
- "v*"

Expand Down Expand Up @@ -33,26 +31,17 @@ jobs:
with:
go-version: "1.20"

- name: Update 'make' on Linux
run: |
sudo apt-get update
sudo apt-get --only-upgrade install build-essential
if: ${{ matrix.platform == 'ubuntu-latest' }}

- name: Install 'make' on macOS
run: |
brew install make
echo "/usr/local/opt/make/libexec/gnubin" >> $GITHUB_PATH
if: ${{ matrix.platform == 'macos-latest' }}

- name: Build the CLI binary
run: make build-cli
run: |
cd mservctl
go build -o ../bin/mservctl
cd ..

- name: Upload ${{ runner.os }} ${{ matrix.arch }} binary
uses: actions/upload-artifact@v3
with:
name: ${{ env.BINARY_NAME }}.${{ runner.os }}.${{ matrix.arch }}
path: mservctl/${{ env.BINARY_NAME }}
name: mservctl.${{ runner.os }}.${{ matrix.arch }}
path: bin/mservctl

release:
needs: [build]
Expand All @@ -73,28 +62,30 @@ jobs:

- uses: actions/download-artifact@v3
with:
name: ${{ env.BINARY_NAME }}.Linux.amd64
name: mservctl.Linux.amd64
path: mservctl.Linux.amd64

- name: Attach Linux binary
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.draft-release.outputs.upload_url }}
asset_path: ./${{ env.BINARY_NAME }}.Linux.amd64/${{ env.BINARY_NAME }}
asset_name: ${{ env.BINARY_NAME }}.linux.amd64
asset_name: mservctl.Linux.amd64
asset_path: mservctl.Linux.amd64/mservctl
asset_content_type: application/octet-stream

- uses: actions/download-artifact@v3
with:
name: ${{ env.BINARY_NAME }}.macos.amd64
name: mservctl.macOS.amd64
path: mservctl.macOS.amd64

- name: Attach macOS binary
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.draft-release.outputs.upload_url }}
asset_path: ./${{ env.BINARY_NAME }}.macos.amd64/${{ env.BINARY_NAME }}
asset_name: ${{ env.BINARY_NAME }}.macos.amd64
asset_name: mservctl.macOS.amd64
asset_path: mservctl.macOS.amd64/mservctl
asset_content_type: application/octet-stream