Skip to content

build: rework build/release pipeline #1

build: rework build/release pipeline

build: rework build/release pipeline #1

Workflow file for this run

# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0
# This GitHub action can publish assets for release when a tag is created.
# Currently its setup to run on any tag that matches the pattern "v*" (ie. v0.1.0).
name: Build
on:
push:
branches: [main]
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-go@v4
with:
go-version: "1.20"
- uses: goreleaser/goreleaser-action@v4
with:
version: latest
args: release --clean --timeout 120m --snapshot
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/upload-artifact@v3
if: github.event_name == 'push'
with:
path: dist/build_*/*