From 38f7fd308fcbfb02d4cc013ca075dcf94715849a Mon Sep 17 00:00:00 2001 From: James Durand Date: Sat, 27 Mar 2021 11:43:27 -0500 Subject: [PATCH 1/3] docs: Added usage documentation to readme --- Readme.md | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/Readme.md b/Readme.md index 00ab7e5..2d0f28e 100644 --- a/Readme.md +++ b/Readme.md @@ -7,9 +7,35 @@ The Bitbucket Pipelines condition for [go-semantic-release](https://github.com/go-semantic-release/semantic-release). +This plugin will make sure that the continuous integration environment +conditions are met. Namely that the release is happening within +Bitbucket Pipelines and is on the correct branch. + ## Usage -TODO +To use this plugin you need to include the following block in your +`.semrelrc` file. + +```json +{ + "plugins": { + "ci-condition": { + "name": "bitbucket@^1.0.0", + // Options can be omitted if you want to use the defaults. + // See the section on configuration below. + "options": { + // Put configuration options here + } + } + } +} +``` + +### Configuration + +| Name | Default Value | Description | +|:--------------:|:-------------:|:-------------------------------------------:| +| defaultBranch | master | The branch where deployments should happen. | ## Licence From 87c24197d8d83ffc590f893c79075642ec3dbedf Mon Sep 17 00:00:00 2001 From: James Durand Date: Sat, 27 Mar 2021 11:44:05 -0500 Subject: [PATCH 2/3] chore: Updated URL's on the badges --- Readme.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Readme.md b/Readme.md index 2d0f28e..945910e 100644 --- a/Readme.md +++ b/Readme.md @@ -1,8 +1,8 @@ # :white_check_mark: condition-bitbucket -[![CI](https://github.com/durandj/semantic-release-condition-bitbucket/workflows/CI/badge.svg?branch=main)](https://github.com/durandj/semantic-release-condition-bitbucket/actions?query=workflow%3ACI+branch%3Amain) -[![Go Report Card](https://goreportcard.com/badge/github.com/durandj/semantic-release-condition-bitbucket)](https://goreportcard.com/report/github.com/durandj/semantic-release-condition-bitbucket) -[![PkgGoDev](https://pkg.go.dev/badge/github.com/durandj/semantic-release-condition-bitbucket)](https://pkg.go.dev/github.com/durandj/semantic-release-condition-bitbucket) +[![CI](https://github.com/go-semantic-release/condition-bitbucket/workflows/CI/badge.svg?branch=main)](https://github.com/go-semantic-release/condition-bitbucket/actions?query=workflow%3ACI+branch%3Amain) +[![Go Report Card](https://goreportcard.com/badge/github.com/go-semantic-release/condition-bitbucket)](https://goreportcard.com/report/github.com/go-semantic-release/condition-bitbucket) +[![PkgGoDev](https://pkg.go.dev/badge/github.com/go-semantic-release/condition-bitbucket)](https://pkg.go.dev/github.com/go-semantic-release/condition-bitbucket) The Bitbucket Pipelines condition for [go-semantic-release](https://github.com/go-semantic-release/semantic-release). From fd4867fc1476eee8cd8e51ad273ee4b2a227808e Mon Sep 17 00:00:00 2001 From: James Durand Date: Sat, 27 Mar 2021 11:48:07 -0500 Subject: [PATCH 3/3] chore: Updated release to only run on main --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3e5e81a..6f5fef8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,6 +34,7 @@ jobs: release: runs-on: ubuntu-latest needs: build + if: github.ref == 'refs/heads/main' steps: - uses: actions/checkout@v2 - uses: actions/setup-go@v2