generated from devlinjunker/template.github.semver
-
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.
Merge pull request #34 from devlinjunker/release-0.4
release-0.4
- Loading branch information
Showing
34 changed files
with
403 additions
and
130 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 |
---|---|---|
@@ -1,9 +1,11 @@ | ||
# Description: <!-- Quickly describe what you are solving and how --> | ||
**Description:** <!-- Quickly describe what you are solving and how --> | ||
|
||
# Related: <!-- Links to Related issues or documentation/references used for this change --> | ||
**Related:** <!-- Links to Related issues or documentation/references used for this change --> | ||
|
||
# Visual: <!-- Add a screenshot! --> | ||
**Visual:** <!-- Add a screenshot! --> | ||
|
||
# TODO: | ||
**Tests:** <!-- Explain Testing done or why testing is not needed --> | ||
|
||
**TODO:** | ||
- [ ] Updated README documents | ||
- [ ] Complete PR Body |
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
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
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
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,30 @@ | ||
name: PR Landmine | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- edited | ||
- reopened | ||
- synchronize | ||
pull_request_review: | ||
types: | ||
- submitted | ||
- edited | ||
- dismissed | ||
|
||
jobs: | ||
landmine: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: 'recursive' | ||
|
||
- name: PR Landmine | ||
uses: tylermurry/github-pr-landmine@v1 | ||
with: | ||
token: ${{ github.token }} | ||
test-command: ./scripts/bin/test.sh | ||
|
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 |
---|---|---|
@@ -1,3 +1,9 @@ | ||
## This Action is run when a commit is made to the main branch (ideally a PR merge) | ||
## - Collects READMEs for Github Wiki | ||
## - Creates Github Release (with codebase after commit) and Git Tag | ||
## - Creates Changelog for Release | ||
## - Upmerges branch to develop (so any changes that were made in release branch are in develop) | ||
|
||
name: "Release-Tag" | ||
|
||
on: | ||
|
@@ -14,7 +20,7 @@ jobs: | |
- name: Collect READMEs for Wiki | ||
run: ./scripts/workflows/collect-wiki.sh | ||
|
||
# from: https://github.com/marketplace/actions/wiki-page-creator-action | ||
# from: https://github.com/marketplace/actions/wiki-page-creator-action | ||
- name: Upload READMEs to Wiki | ||
uses: docker://decathlon/wiki-page-creator-action:latest | ||
env: | ||
|
@@ -31,6 +37,11 @@ jobs: | |
max-parallel: 1 | ||
runs-on: ubuntu-latest | ||
|
||
outputs: | ||
major: ${{ steps.version.outputs.major }} | ||
minor: ${{ steps.version.outputs.minor }} | ||
patch: ${{ steps.version.outputs.patch }} | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
|
@@ -72,20 +83,26 @@ jobs: | |
strategy: | ||
max-parallel: 1 | ||
runs-on: ubuntu-latest | ||
needs: create-release-tag | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
## This is a Personal Access Token from Admin User that allows us to bypass branch protections on develop | ||
token: ${{ secrets.PAT }} | ||
fetch-depth: 0 | ||
|
||
- name: Upmerge develop After Release | ||
run: | | ||
git config --global user.name 'Release Cut'; | ||
git config --global user.email '[email protected]'; | ||
./scripts/release/release-prep-upmerge.sh | ||
./scripts/release/release-prep-upmerge.sh main | ||
git commit -m "upmerge after $RELEASE"; | ||
git push; | ||
git checkout $RELEASE_BRANCH; | ||
git pull; | ||
git merge main; | ||
git push; | ||
env: | ||
RELEASE: v${{ steps.version.outputs.major }}.${{ steps.version.outputs.minor }}.${{ steps.version.outputs.patch }} | ||
RELEASE: v${{ needs.create-release-tag.outputs.major }}.${{ needs.create-release-tag.outputs.minor }}.${{ needs.create-release-tag.outputs.patch }} | ||
RELEASE_BRANCH: release-${{ needs.create-release-tag.outputs.major }}.${{ needs.create-release-tag.outputs.minor }} |
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
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
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
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
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,96 @@ | ||
## This action is run when a commit is made to a `release-*` branch (ideally from patch-* PR) | ||
## - Creates Github Release (with codebase after commit) and Git Tag | ||
## - Creates Changelog for Release | ||
## - Upmerges branch to develop (so any changes that were made in release branch are in develop) | ||
|
||
name: "Release-Merge" | ||
|
||
on: | ||
push: | ||
branches: | ||
- release-* | ||
|
||
jobs: | ||
create-release-tag: | ||
strategy: | ||
max-parallel: 1 | ||
runs-on: ubuntu-latest | ||
|
||
outputs: | ||
major: ${{ steps.version.outputs.major }} | ||
minor: ${{ steps.version.outputs.minor }} | ||
patch: ${{ steps.version.outputs.patch }} | ||
found: ${{ steps.check_release.outputs.found }} | ||
release-commit: ${{ steps.check_release.outputs.release-commit }} | ||
main-commit: ${{ steps.check_release.outputs.main-commit }} | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
## This is a Personal Access Token from Admin User that allows us to bypass branch protections on develop | ||
token: ${{ secrets.PAT }} | ||
fetch-depth: 0 | ||
|
||
# NOTE: Update CHANGELOG_PREFIX_LIST to configure the lines you wan to include in the changelog (body of release PR) | ||
- name: "Get Release Info" | ||
id: version | ||
run: | | ||
git fetch --all --tags; | ||
git checkout ${GITHUB_REF##*/}; | ||
cd scripts/release; | ||
unzip git-mkver-linux.zip; | ||
cd ../..; | ||
echo "##[set-output name=major;]$(./scripts/release/git-mkver-linux next --format '{Major}')"; | ||
echo "##[set-output name=minor;]$(./scripts/release/git-mkver-linux next --format '{Minor}')"; | ||
echo "##[set-output name=patch;]$(./scripts/release/git-mkver-linux next --format '{Patch}')"; | ||
CHANGELOG=$(git log --format=%s $(git describe --tags --abbrev=0)..HEAD | grep -i -E "^($CHANGELOG_PREFIX_LIST)" | sed "s/^/ - /") | ||
CHANGELOG="${CHANGELOG//'%'/'%25'}" | ||
CHANGELOG="${CHANGELOG//$'\n'/'%0A'}" | ||
CHANGELOG="${CHANGELOG//$'\r'/'%0D'}" | ||
echo "##[set-output name=changelog;]$(echo $CHANGELOG)"; | ||
env: | ||
CHANGELOG_PREFIX_LIST: "feature|feat|fix|bugfix|bug" | ||
|
||
- name: Check Create Release | ||
id: check_release | ||
run: | | ||
git checkout main; | ||
echo "##[set-output name=found;]$(git log | grep ${GITHUB_REF##*/})"; | ||
echo "##[set-output name=main-commit;]$(git log --oneline main | awk '{if (NR == 1) commit=$1 } END { print commit }')"; | ||
echo "##[set-output name=release-commit;]$(git log --oneline ${GITHUB_REF##*/} | awk '{if (NR == 1) commit=$1 } END { print commit }')"; | ||
git checkout ${GITHUB_REF} | ||
- name: Create Github Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
if: steps.check_release.outputs.found != '' && steps.check_release.outputs.release-commit != steps.check_release.outputs.main-commit | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: v${{ steps.version.outputs.major }}.${{ steps.version.outputs.minor }}.${{ steps.version.outputs.patch }} | ||
release_name: release-${{ steps.version.outputs.major }}.${{ steps.version.outputs.minor }}.${{ steps.version.outputs.patch }} | ||
body: ${{ steps.version.outputs.changelog }} | ||
|
||
upmerge-after-release: | ||
strategy: | ||
max-parallel: 1 | ||
runs-on: ubuntu-latest | ||
needs: create-release-tag | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
## This is a Personal Access Token from Admin User that allows us to bypass branch protections on develop | ||
token: ${{ secrets.PAT }} | ||
fetch-depth: 0 | ||
|
||
- name: Upmerge develop After Release | ||
if: needs.create-release-tag.outputs.found != '' && needs.create-release-tag.outputs.release-commit != needs.create-release-tag.outputs.main-commit | ||
run: | | ||
git config --global user.name 'Release Cut'; | ||
git config --global user.email '[email protected]'; | ||
./scripts/release/release-prep-upmerge.sh ${GITHUB_REF##*/} | ||
git commit -m "upmerge after $RELEASE"; | ||
git push; | ||
env: | ||
RELEASE: v${{ needs.create-release-tag.outputs.major }}.${{ needs.create-release-tag.outputs.minor }}.${{ needs.create-release-tag.outputs.patch }} |
Oops, something went wrong.