generated from actions/container-action
-
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.
Create a new release on every pull request merge (#1)
Using semantic versioning[1] Use GoReleaser[2] to create a new release every time a pull request is merged to master. This requires each pull request to have a semantic version label, which we enforce by using a label-checker GitHub Action[3]. [1] https://semver.org/ [2] https://goreleaser.com/ci/ [3] https://github.com/agilepathway/label-checker NB we don't build an executable when releasing, as this is not (currently, anyway) a Go project.
- Loading branch information
Showing
3 changed files
with
74 additions
and
0 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,21 @@ | ||
--- | ||
name: Label Checker | ||
on: # yamllint disable-line rule:truthy | ||
pull_request: | ||
types: | ||
- opened | ||
- synchronize | ||
- reopened | ||
- labeled | ||
- unlabeled | ||
|
||
jobs: | ||
|
||
check_semver_label: | ||
name: Check for semantic version label | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: docker://agilepathway/pull-request-label-checker:latest | ||
with: | ||
one_of: major,minor,patch | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} |
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,46 @@ | ||
name: Tag | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- closed | ||
|
||
jobs: | ||
|
||
tag: | ||
name: Tag semantic version | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Tag | ||
uses: K-Phoen/[email protected] | ||
with: | ||
release_branch: master | ||
release_strategy: tag | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
release: | ||
needs: tag | ||
name: Create GitHub 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@v1 | ||
with: | ||
go-version: 1.14.x | ||
- | ||
name: Run GoReleaser | ||
uses: goreleaser/goreleaser-action@v1 | ||
with: | ||
version: latest | ||
args: release --rm-dist | ||
key: ${{ secrets.YOUR_PRIVATE_KEY }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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,7 @@ | ||
--- | ||
project_name: label-checker | ||
build: | ||
skip: true | ||
release: | ||
github: | ||
prerelease: auto |