Files
atlantis/.github/workflows/release.yml
Workflow config file is invalid. Please check your config file: yaml: unmarshal errors: line 30: mapping key "version" already defined at line 25
Rui Chen 53d968927c feat: goreleaser-action v6 (#4670)
Signed-off-by: Rui Chen <rui@chenrui.dev>
2024-06-15 21:43:34 -04:00

62 lines
1.8 KiB
YAML

name: release
on:
push:
tags:
- v*.*.*
workflow_dispatch:
jobs:
goreleaser:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
with:
submodules: true
- uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5
with:
go-version-file: go.mod
- name: Run GoReleaser for stable release
uses: goreleaser/goreleaser-action@286f3b13b1b49da4ac219696163fb8c1c93e1200 # v6
if: (!contains(github.ref, 'pre'))
with:
version: v1.16.2
# You can pass flags to goreleaser via GORELEASER_ARGS
# --clean will save you deleting the dist dir
args: release --clean
distribution: goreleaser # or 'goreleaser-pro'
version: "~> v2" # or 'latest', 'nightly', semver
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Generate changelog for pre release
if: contains(github.ref, 'pre')
id: changelog
run: |
echo "RELEASE_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
gh api repos/$GITHUB_REPOSITORY/releases/generate-notes \
-f tag_name="${GITHUB_REF#refs/tags/}" \
-f target_commitish=main \
-q .body > tmp-CHANGELOG.md
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
homebrew:
name: "Bump Homebrew formula"
runs-on: ubuntu-22.04
if: false
# if: (!contains(github.ref, 'pre'))
steps:
- uses: mislav/bump-homebrew-formula-action@v2
with:
# A PR will be sent to github.com/Homebrew/homebrew-core to update this formula:
formula-name: atlantis
commit-message: |
{{formulaName}} {{version}}
Created by https://github.com/mislav/bump-homebrew-formula-action
env:
COMMITTER_TOKEN: ${{ secrets.GITHUB_TOKEN }}