Goreleaser [deprecated](https://goreleaser.com/deprecations/?h=replacement#archivesreplacements) the replacements yaml property, which has been causing our binary publications to fail for a while now. This fixes the yaml and introduces a slack message for binary publication failures.
38 lines
1.1 KiB
YAML
38 lines
1.1 KiB
YAML
name: Publish binary
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
SetEnv:
|
|
environment: Testing
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
version: ${{ steps.version.outputs.version }}
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Get version string
|
|
id: version
|
|
run: |
|
|
if ${{ startsWith(github.ref, 'refs/tags/') }}; then
|
|
echo "version=$(git describe --exact-match --tags $(git rev-parse HEAD))" | tee -a $GITHUB_OUTPUT
|
|
else
|
|
echo "version=$(echo unreleased-$(git rev-parse --short HEAD))" | tee -a $GITHUB_OUTPUT
|
|
fi
|
|
|
|
Publish-Binary:
|
|
needs: [SetEnv]
|
|
environment: Testing
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Publish Binary
|
|
uses: ./.github/actions/publish-binary
|
|
with:
|
|
version: ${{ needs.SetEnv.outputs.version }}
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
rudderstack_write_key: ${{ secrets.RUDDERSTACK_CORSO_WRITE_KEY }}
|
|
rudderstack_data_plane_url: ${{ secrets.RUDDERSTACK_CORSO_DATA_PLANE_URL }}
|
|
slack_webhook_url: ${{ secrets.SLACK_WEBHOOK_URL }} |