Skip to content

Prepare 1.14.1 release (#672) #35

Prepare 1.14.1 release (#672)

Prepare 1.14.1 release (#672) #35

Workflow file for this run

name: goreleaser
on:
workflow_dispatch:
push:
tags:
- '*.*.*'
jobs:
goreleaser:
name: Release a new version
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.23"
id: go
- name: Cache Go Modules
uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Install hub
uses: geertvdc/setup-hub@master
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
- name: Update AWS cli
uses: chrislennon/[email protected]
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
- name: Get the version
id: get_version
run: |
VERSION=${GITHUB_REF/refs\/tags\//}
if ${{github.event_name == 'workflow_dispatch'}}; then
VERSION=$(git describe --abbrev=0 --tags)
fi
echo "VERSION=${VERSION}" >> $GITHUB_OUTPUT
- name: Get the builtvar
id: get_built
run: echo "BUILT=$(date -u +%a_%d_%b_%H:%M:%S_%Y)" >> $GITHUB_OUTPUT
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN_EXTRA }}
VERSION: ${{ steps.get_version.outputs.VERSION }}
BUILT: ${{ steps.get_built.outputs.BUILT }}
OWNER: elastic
REPO: ecctl
with:
version: '~> v2'
args: release --clean
- name: Run release post actions
run: ./scripts/goreleaser-post-actions.sh $VERSION
env:
# elasticcloudmachine GitHub token.
GITHUB_TOKEN: ${{ secrets.HOMEBREW_TAP_GH_TOKEN }}
GITHUB_USER: elasticcloudmachine
VERSION: ${{ steps.get_version.outputs.VERSION }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
GIT_COMMITTER_EMAIL: [email protected]
GIT_AUTHOR_EMAIL: [email protected]
GIT_AUTHOR_NAME: elasticcloudmachine