forked from civo/terraform-provider-civo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
60 additions
and
52 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,57 @@ | ||
name: Prepare release | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
newVersionTag: | ||
description: 'New version tag (e.g. v0.10.11)' | ||
required: true | ||
|
||
jobs: | ||
prepare_release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Unshallow | ||
run: git fetch --prune --unshallow | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.16.x | ||
|
||
- name: Install and run tfplugindocs CLI | ||
run: | | ||
mkdir downloads | ||
cd downloads | ||
wget https://github.com/hashicorp/terraform-plugin-docs/releases/download/v0.5.0/tfplugindocs_0.5.0_linux_amd64.zip | ||
unzip tfplugindocs_0.5.0_linux_amd64.zip | ||
cd .. | ||
mv downloads/tfplugindocs . | ||
./tfplugindocs generate | ||
rm -rf ./tfplugindocs downloads | ||
- name: Install and run auto-changelog CLI | ||
run: | | ||
npm i -g [email protected] | ||
auto-changelog --config=.auto-changelog-config | ||
- name: Add and commit generated docs and CHANGELOG.md | ||
uses: test-room-7/action-update-file@v1 | ||
with: | ||
branch: master | ||
commit-msg: Update docs and CHANGELOG.md | ||
file-path: | | ||
docs/**/*.md | ||
examples/**/*.tf | ||
examples/**/*.sh | ||
CHANGELOG.md | ||
github-token: ${{ secrets.GHTOKEN }} | ||
|
||
- name: Create tag | ||
uses: negz/create-tag@v1 | ||
with: | ||
version: ${{ github.event.inputs.newVersionTag }} | ||
token: ${{ secrets.GHTOKEN }} |
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 |
---|---|---|
|
@@ -6,69 +6,20 @@ on: | |
- 'v*.*.*' | ||
|
||
jobs: | ||
docs-and-changelog: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Unshallow | ||
run: | | ||
git fetch --prune --unshallow | ||
echo "Current branch name is: $(git branch --show-current)" | ||
echo "Latest hash is: $(git rev-parse HEAD)" | ||
run: git fetch --prune --unshallow | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.16.x | ||
|
||
- name: Install and run tfplugindocs CLI | ||
run: | | ||
mkdir downloads | ||
cd downloads | ||
wget https://github.com/hashicorp/terraform-plugin-docs/releases/download/v0.5.0/tfplugindocs_0.5.0_linux_amd64.zip | ||
unzip tfplugindocs_0.5.0_linux_amd64.zip | ||
cd .. | ||
mv downloads/tfplugindocs . | ||
./tfplugindocs generate | ||
rm -rf ./tfplugindocs downloads | ||
- name: Install and run auto-changelog CLI | ||
run: | | ||
npm i -g [email protected] | ||
auto-changelog --config=.auto-changelog-config | ||
- name: Add and commit generated docs and CHANGELOG.md | ||
uses: test-room-7/action-update-file@v1 | ||
with: | ||
branch: master | ||
commit-msg: Update docs and CHANGELOG.md | ||
file-path: | | ||
docs/**/*.md | ||
examples/**/*.tf | ||
examples/**/*.sh | ||
CHANGELOG.md | ||
github-token: ${{ secrets.GHTOKEN }} | ||
|
||
goreleaser: | ||
needs: docs-and-changelog | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Pull latest changes (docs and CHANGELOG.md) | ||
run: | | ||
git pull origin master | ||
echo "Current branch name is: $(git branch --show-current)" | ||
echo "Latest hash is: $(git rev-parse HEAD)" | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.16.x | ||
|
||
- name: Import GPG key | ||
id: import_gpg | ||
uses: paultyng/[email protected] | ||
|