summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.devcontainer/Dockerfile2
-rw-r--r--.gitignore1
-rw-r--r--.goreleaser.yml26
-rw-r--r--docs/contributing.md26
4 files changed, 55 insertions, 0 deletions
diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile
index e5d85e71..b2612687 100644
--- a/.devcontainer/Dockerfile
+++ b/.devcontainer/Dockerfile
@@ -60,3 +60,5 @@ RUN echo "alias tf=terraform" >> "/root/.bashrc"
# Switch back to dialog for any ad-hoc use of apt-get
ENV DEBIAN_FRONTEND=dialog
+
+RUN curl -sfL https://install.goreleaser.com/github.com/goreleaser/goreleaser.sh | sh -s -- "v0.132.1"
diff --git a/.gitignore b/.gitignore
index 5ff84993..09b4e00e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -19,6 +19,7 @@ crash.log
# unwanted binary file
**/debug.test
+dist
#GoLand Editor configuration
diff --git a/.goreleaser.yml b/.goreleaser.yml
new file mode 100644
index 00000000..098e41a4
--- /dev/null
+++ b/.goreleaser.yml
@@ -0,0 +1,26 @@
+# This is an example goreleaser.yaml file with some sane defaults.
+builds:
+- env:
+ - CGO_ENABLED=0
+ goos:
+ - linux
+ - windows
+ - darwin
+archives:
+- format_overrides:
+ - goos: windows
+ format: zip
+checksum:
+ name_template: 'checksums.txt'
+snapshot:
+ name_template: "terraform-provider-azuredevops"
+changelog:
+ sort: asc
+ filters:
+ exclude:
+ - '^docs:'
+ - '^test:'
+release:
+ github:
+ owner: microsoft
+ name: terraform-provider-azuredevops
diff --git a/docs/contributing.md b/docs/contributing.md
index 3be16d78..8c394411 100644
--- a/docs/contributing.md
+++ b/docs/contributing.md
@@ -453,6 +453,32 @@ Azure DevOps has a rich set of [REST API's](https://docs.microsoft.com/en-us/res
If you find an api is missing from the postman collection, please submit a PR. We intend make the collection as complete as possible over time.
+## 8. Creating a release
+
+You can create a github release of this project or a fork of this project using goreleaser. The gorelease will create binaries for Mac, Linux and Windows based of the fork you're making the release from.
+To be able to make the release you need to have the required permissions to create a release for this project or a fork.
+
+> To make the release for your fork change the `owner` in `.goreleaser.yml` to be the name of the account holding the fork.
+
+Making the release:
+1. Open this project in the dev container or [install gorelaser](https://goreleaser.com/install/)
+1. Create a Github PAT token with all of the `Repo` permissions
+1. Set `GITHUB_TOKEN` enviorment variable to the above PAT token
+ ```bash
+ export GITHUB_TOKEN=<Your PAT token>
+ ```
+1. Set the release version you would like to create
+ ```bash
+ RELEASE_VERSION="v0.1.7"
+ ```
+1. Create
+ ```bash
+ git tag $RELEASE_VERSION && ./bin/goreleaser release --rm-dist
+
+ ```
+
+> More information about using goreleaser here: https://goreleaser.com/
+
# Note about CLA
This project welcomes contributions and suggestions. Most contributions require you to agree to a