85 lines
2.3 KiB
YAML
85 lines
2.3 KiB
YAML
name: Publish Binary
|
|
|
|
###################################
|
|
# notice:
|
|
# This file has undergone major
|
|
# renaming for the canario fork.
|
|
# In case of re-incorporation back
|
|
# to corso, this refactoring will
|
|
# need to be undone.
|
|
###################################
|
|
|
|
inputs:
|
|
version:
|
|
description: Corso version to use for publishing
|
|
required: true
|
|
github_token:
|
|
description: GitHub token for publishing
|
|
required: true
|
|
rudderstack_write_key:
|
|
description: Write key for RudderStack
|
|
required: true
|
|
rudderstack_data_plane_url:
|
|
description: Data plane URL for RudderStack
|
|
required: true
|
|
|
|
runs:
|
|
using: composite
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 0 # needed to pull changelog
|
|
|
|
- name: Setup Golang with cache
|
|
uses: magnetikonline/action-golang-cache@v4
|
|
with:
|
|
go-version-file: src/go.mod
|
|
|
|
- name: Mark snapshot release
|
|
shell: bash
|
|
if: ${{ !startsWith(github.ref , 'refs/tags/') }}
|
|
run: |
|
|
echo "grflags=--snapshot" >> $GITHUB_ENV
|
|
|
|
- name: Run GoReleaser
|
|
uses: goreleaser/goreleaser-action@v4
|
|
with:
|
|
version: latest
|
|
args: release --clean --timeout 500m --parallelism 1 ${{ env.grflags }}
|
|
workdir: src
|
|
env:
|
|
GITHUB_TOKEN: ${{ inputs.github_token }}
|
|
RUDDERSTACK_CANARIO_WRITE_KEY: ${{ inputs.rudderstack_write_key }}
|
|
RUDDERSTACK_CANARIO_DATA_PLANE_URL: ${{ inputs.rudderstack_data_plane_url }}
|
|
CANARIO_VERSION: ${{ inputs.version }}
|
|
|
|
- name: Upload darwin arm64
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: canario_Darwin_arm64
|
|
path: src/dist/canario_darwin_arm64/canario
|
|
|
|
- name: Upload linux arm64
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: canario_Linux_arm64
|
|
path: src/dist/canario_linux_arm64/canario
|
|
|
|
- name: Upload darwin amd64
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: canario_Darwin_amd64
|
|
path: src/dist/canario_darwin_amd64_v1/canario
|
|
|
|
- name: Upload linux amd64
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: canario_Linux_amd64
|
|
path: src/dist/canario_linux_amd64_v1/canario
|
|
|
|
- name: Upload windows amd64
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: canario_Windows_amd64
|
|
path: src/dist/canario_windows_amd64_v1/canario.exe
|