Skip to content

Merge pull request #2415 from reviewdog/renovate/gitlab.com-gitlab-or… #79

Merge pull request #2415 from reviewdog/renovate/gitlab.com-gitlab-or…

Merge pull request #2415 from reviewdog/renovate/gitlab.com-gitlab-or… #79

Workflow file for this run

name: release
on:
push:
branches:
- master
- release-*
tags:
- "v*.*.*"
pull_request:
types:
- labeled
jobs:
release:
permissions:
contents: write
pull-requests: write
if: github.event.action != 'labeled'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
# Bump version on merging Pull Requests with specific labels.
# (bump:major,bump:minor,bump:patch)
- id: bumpr
if: "!startsWith(github.ref, 'refs/tags/')"
uses: haya14busa/action-bumpr@faf6f474bcb6174125cfc569f0b2e24cbf03d496 # v1.11.4
# Get tag name.
- id: tag
uses: haya14busa/action-cond@94f77f7a80cd666cb3155084e428254fea4281fd # v1.2.1
with:
cond: "${{ startsWith(github.ref, 'refs/tags/') }}"
if_true: ${{ github.ref }}
if_false: ${{ steps.bumpr.outputs.next_version }}
# Setup Go for building reviewdog binary.
- uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5.6.0
if: "steps.tag.outputs.value != ''"
with:
go-version-file: "go.mod"
# Create release.
- name: Create release with goreleaser
uses: goreleaser/goreleaser-action@e435ccd777264be153ace6237001ef4d979d3a7a # v6.4.0
if: "steps.tag.outputs.value != ''"
with:
version: "~> v2"
args: release --clean --release-header .github/goreleaser-header.md
env:
# Need to use personal access token instead of default token to
# update https://github.com/reviewdog/homebrew-tap.
GITHUB_TOKEN: ${{ secrets.RELEASE_GITHUB_TOKEN }}
- name: Trigger depup workflows
if: "steps.tag.outputs.value != ''"
env:
# Need to use personal access token instead of default token to
# trigger workflow of other repositories.
DEPUP_GITHUB_API_TOKEN: ${{ secrets.RELEASE_GITHUB_TOKEN }}
run: go run ./scripts/trigger-depup/main.go
release-check:
permissions:
contents: write
pull-requests: write
if: github.event.action == 'labeled'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
- name: Post bumpr status comment
uses: haya14busa/action-bumpr@faf6f474bcb6174125cfc569f0b2e24cbf03d496 # v1.11.4