-
Notifications
You must be signed in to change notification settings - Fork 537
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Khosrow Moossavi <khos2ow@gmail.com>
- Loading branch information
Showing
2 changed files
with
55 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
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 }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters