mirror of
https://github.com/terraform-docs/terraform-docs.git
synced 2026-03-27 04:48:33 +07:00
46 lines
1.4 KiB
YAML
46 lines
1.4 KiB
YAML
name: release-cut
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
version:
|
|
description: "The version to be released (without leading v)"
|
|
required: true
|
|
type: string
|
|
|
|
jobs:
|
|
release:
|
|
runs-on: ubuntu-latest
|
|
if: "!contains(github.event.head_commit.message, '[ci skip]')"
|
|
permissions:
|
|
contents: write
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
ref: master
|
|
fetch-depth: 0
|
|
|
|
- name: Prepare v${{ inputs.version }} Release
|
|
run: |
|
|
make release VERSION=${{ inputs.version }}
|
|
|
|
- name: Push v${{ inputs.version }} Changes
|
|
uses: stefanzweifel/git-auto-commit-action@v5
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.COMMITTER_TOKEN }}
|
|
with:
|
|
file_pattern: "README.md docs/user-guide/installation.md internal/version/version.go"
|
|
commit_message: "Release version v${{ inputs.version }}"
|
|
commit_user_name: terraform-docs-bot
|
|
commit_user_email: bot@terraform-docs.io
|
|
commit_author: "terraform-docs-bot <bot@terraform-docs.io>"
|
|
|
|
- name: Cut v${{ inputs.version }} Release
|
|
run: |
|
|
git config --global user.name terraform-docs-bot
|
|
git config --global user.email bot@terraform-docs.io
|
|
|
|
git tag --annotate --message "v${{ inputs.version }} Release" "v${{ inputs.version }}"
|
|
git push origin "v${{ inputs.version }}"
|