-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: adds workflows for automatic releases
- Loading branch information
Showing
10 changed files
with
3,005 additions
and
161 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 |
---|---|---|
|
@@ -20,7 +20,7 @@ insert_final_newline = true | |
[*.json] | ||
indent_size = 2 | ||
|
||
[*.yaml] | ||
[*.{yaml,yml}] | ||
indent_size = 2 | ||
|
||
[*.md] | ||
|
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,18 @@ | ||
name: Pull Request | ||
on: | ||
pull_request: | ||
|
||
jobs: | ||
build_image: | ||
name: Build Image | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Push Docker Image to Github Registry | ||
uses: whoan/docker-build-with-cache-action@v5 | ||
with: | ||
username: "${{ github.actor }}" | ||
password: "${{ secrets.GITHUB_TOKEN }}" | ||
image_name: ${{ secrets.package_name }} | ||
image_tag: ${{ github.sha }} | ||
registry: docker.pkg.github.com |
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,64 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- github-actions | ||
jobs: | ||
release: | ||
name: Generate Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 12 | ||
- name: Install dependencies | ||
run: yarn install --frozen-lockfile | ||
- name: Release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: npx semantic-release | ||
check_for_tag: | ||
name: Get Release Tag | ||
needs: release | ||
runs-on: ubuntu-latest | ||
outputs: | ||
currentTag: ${{ steps.setTag.outputs.currentTag }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
# Use the latest commit on the branch which triggered this workflow, | ||
# not the commit which triggered the workflow | ||
ref: ${{ github.ref }} | ||
- name: Fetch tags | ||
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* | ||
- name: Get target git ref | ||
id: setTag | ||
# Print any tags associated with the target ref, in reverse lexicographical | ||
# order so that the first item is the highest version number. If we find | ||
# a tag, update our target | ||
run: | | ||
CURRENT_TAG=$(git tag --sort=-refname --points-at ${{ github.ref }} | head -n 1) | ||
echo "::set-output name=currentTag::$CURRENT_TAG" | ||
build_image: | ||
name: Build Image for Tag | ||
needs: check_for_tag | ||
runs-on: ubuntu-latest | ||
if: needs.check_for_tag.outputs.currentTag | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
ref: ${{ needs.check_for_tag.outputs.currentTag }} | ||
- name: Push Docker Image to Github Registry | ||
uses: whoan/docker-build-with-cache-action@v5 | ||
with: | ||
username: "${{ github.actor }}" | ||
password: "${{ secrets.GITHUB_TOKEN }}" | ||
image_name: ${{ secrets.package_name }} | ||
image_tag: ${{ needs.check_for_tag.outputs.currentTag }} | ||
push_git_tag: true | ||
registry: docker.pkg.github.com |
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,22 @@ | ||
{ | ||
"branches": ["github-actions"], | ||
"plugins": [ | ||
"@semantic-release/commit-analyzer", | ||
"@semantic-release/release-notes-generator", | ||
[ | ||
"@semantic-release/changelog", | ||
{ | ||
"changelogTitle": "# Changelog\n\nAll notable changes to this project will be documented in this file. See\n[Conventional Commits](https://conventionalcommits.org) for commit guidelines." | ||
} | ||
], | ||
["@semantic-release/npm", { "npmPublish": false }], | ||
"@semantic-release/github", | ||
[ | ||
"@semantic-release/git", | ||
{ | ||
"assets": ["package.json", "CHANGELOG.md"], | ||
"message": "chore(release): Release ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}" | ||
} | ||
] | ||
] | ||
} |
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,28 @@ | ||
# Changelog | ||
|
||
All notable changes to this project will be documented in this file. See | ||
[Conventional Commits](https://conventionalcommits.org) for commit guidelines. | ||
|
||
# [0.6.0](http://github.com/lyft/flyteconsole/compare/v0.5.2...v0.6.0) (2020-05-13) | ||
|
||
|
||
### Bug Fixes | ||
|
||
* adds proper plugin to update package.json when releasing ([8640ac7](http://github.com/lyft/flyteconsole/commit/8640ac7f8e9620aa1484c30d24c50fe7862021ad)) | ||
|
||
|
||
### Features | ||
|
||
* testing publishing of a release ([3c77418](http://github.com/lyft/flyteconsole/commit/3c774183c897a17c29481eba65b93a358b62cc8e)) | ||
|
||
# [0.6.0](http://github.com/lyft/flyteconsole/compare/v0.5.2...v0.6.0) (2020-05-13) | ||
|
||
|
||
### Bug Fixes | ||
|
||
* adds proper plugin to update package.json when releasing ([8640ac7](http://github.com/lyft/flyteconsole/commit/8640ac7f8e9620aa1484c30d24c50fe7862021ad)) | ||
|
||
|
||
### Features | ||
|
||
* testing publishing of a release ([3c77418](http://github.com/lyft/flyteconsole/commit/3c774183c897a17c29481eba65b93a358b62cc8e)) |
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 @@ | ||
module.exports = { extends: ['@commitlint/config-conventional'] }; |
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
Oops, something went wrong.