mirror of
https://git.vectorsigma.ru/public/atlantis.git
synced 2026-07-29 06:08:21 +00:00
67 lines
2.0 KiB
YAML
67 lines
2.0 KiB
YAML
name: release
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- v*.*.* # stable release like, v0.19.2
|
|
- v*.*.*-pre.* # pre release like, v0.19.0-pre.calendardate
|
|
|
|
jobs:
|
|
goreleaser:
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
with:
|
|
submodules: true
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v3
|
|
with:
|
|
go-version: 1.19
|
|
|
|
- name: Run GoReleaser for stable release
|
|
uses: goreleaser/goreleaser-action@v4
|
|
if: (!contains(github.ref, '-pre.'))
|
|
with:
|
|
version: v0.183.0
|
|
args: release --rm-dist
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Generate changelog for pre release
|
|
if: contains(github.ref, '-pre.')
|
|
id: changelog
|
|
run: |
|
|
echo "::set-output name=RELEASE_TAG::${GITHUB_REF#refs/tags/}"
|
|
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}}
|
|
- name: Run GoReleaser for pre-release
|
|
uses: goreleaser/goreleaser-action@v4
|
|
if: contains(github.ref, '-pre.')
|
|
with:
|
|
version: v0.183.0
|
|
args: release --rm-dist --release-notes=tmp-CHANGELOG.md
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
GORELEASER_CURRENT_TAG: ${{ steps.changelog.outputs.RELEASE_TAG }}
|
|
|
|
homebrew:
|
|
name: "Bump Homebrew formula"
|
|
runs-on: ubuntu-22.04
|
|
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.PUBLIC_REPO_ACCESS_TOKEN }}
|