@@ -190,6 +190,54 @@ resource "cloudstack_instance" "web" {
190190}
191191```
192192
193+ ## Releasing Terraform Provider
194+
195+ The CloudStack Terraform Provider release process requires ` goreleaser ` to be performed
196+ by a committer or a PMC member of the project: https://goreleaser.com/install
197+
198+ Check and ensure TF provider passes builds, GA and run this for local checks:
199+ ```
200+ goreleaser release --snapshot --clean
201+ ```
202+
203+ Next, create a personalised Github token:
https://github.com/settings/tokens/new?scopes=repo,write:packages
204+
205+ ```
206+ export GITHUB_TOKEN="YOUR_GH_TOKEN"
207+ ```
208+
209+ Note: Due to how the Terraform registry works, it require the repo to be named in a certain way.
210+ For this reason, the builds are published via https://github.com/cloudstack/terraform-provider-cloudstack/releases
211+
212+ To do this, add the following remote for publishing builds:
213+
214+ ```
215+ git remote add cloudstack [email protected] :cloudstack/terraform-provider-cloudstack.git 216+ ```
217+
218+ Finally tag the release, for example and push to Github:
219+
220+ ```
221+ git tag -a v0.5.0-pre -m "v0.5.0-pre Alpha Release for testing purposes"
222+ git push cloudstack v0.5.0-pre
223+ ```
224+
225+ Run goreleaser to release them:
226+ ```
227+ goreleaser release --clean
228+ ```
229+
230+ Or, just release using:
231+ ```
232+ goreleaser release
233+ ```
234+
235+ For testing or to push on other repos, you need to fix repo path in the
236+ ` .goreleaser.yml ` and run:
237+ ```
238+ goreleaser release --clean --skip-validate
239+ ```
240+
193241## History
194242
195243This codebase relicensed under APLv2 and donated to the Apache CloudStack
0 commit comments