Skip to content
This repository has been archived by the owner on Apr 11, 2022. It is now read-only.

Commit

Permalink
chore(release): add gh actions workflow and automated semantic releas…
Browse files Browse the repository at this point in the history
…es (#224)

* chore(release): add gh actions workflow and automated semantic releases

* chore(release): use blockstack-devops gh token

* chore(release): update workflow
  • Loading branch information
CharlieC3 authored Jul 24, 2020
1 parent d67612d commit 1de10fc
Show file tree
Hide file tree
Showing 3 changed files with 876 additions and 18 deletions.
78 changes: 78 additions & 0 deletions .github/workflows/blockstack-explorer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: blockstack-explorer

on:
push:
branches:
- '**'
tags-ignore:
- '**'
paths-ignore:
- '**/CHANGELOG.md'
pull_request:

jobs:
build-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
token: ${{ secrets.GH_TOKEN }}

- name: Notify slack start
if: success()
id: slack
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
uses: voxmedia/[email protected]
with:
channel: devops-notify
status: STARTING
color: warning

- name: Semantic Release
uses: cycjimmy/[email protected]
id: semantic
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SEMANTIC_RELEASE_PACKAGE: ${{ github.workflow }}
with:
extra_plugins: |
@semantic-release/changelog
@semantic-release/git
semantic-release-slack-bot
- name: Build/Tag/Push Image
uses: docker/build-push-action@v1
with:
repository: blockstack/${{ github.workflow }}
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_PASSWORD }}
registry: quay.io
tags: ${{ steps.semantic.outputs.new_release_version }}
tag_with_ref: true
add_git_labels: true
# Only push if there's a new release on main branch, or if building a non-main branch
push: ${{ github.ref != 'refs/heads/master' || steps.semantic.outputs.new_release_version != '' }}

- name: Notify slack success
if: success()
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
uses: voxmedia/[email protected]
with:
message_id: ${{ steps.slack.outputs.message_id }}
channel: devops-notify
status: SUCCESS
color: good

- name: Notify slack fail
if: failure()
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
uses: voxmedia/[email protected]
with:
message_id: ${{ steps.slack.outputs.message_id }}
channel: devops-notify
status: FAILED
color: danger
30 changes: 30 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,33 @@
"engines": {
"node": ">10.15"
},
"commitlint": {
"extends": [
"@commitlint/config-conventional"
]
},
"husky": {
"hooks": {
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
}
},
"release": {
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/github",
"@semantic-release/changelog",
"@semantic-release/git",
[
"semantic-release-slack-bot",
{
"notifyOnSuccess": true,
"notifyOnFail": true,
"markdownReleaseNotes": true
}
]
]
},
"dependencies": {
"@awaitjs/express": "^0.1.4",
"@promster/express": "^3.4.1",
Expand Down Expand Up @@ -57,6 +84,8 @@
"system-components": "^3.0.1"
},
"devDependencies": {
"@commitlint/cli": "^9.1.1",
"@commitlint/config-conventional": "^9.1.1",
"@types/express": "^4.17.2",
"babel-eslint": "^10.0.1",
"babel-jest": "^23.4.2",
Expand All @@ -73,6 +102,7 @@
"eslint-plugin-prettier": "^3.0.0",
"eslint-plugin-react": "^7.7.0",
"eslint-scope": "^4.0.0",
"husky": "^4.2.5",
"jest": "^23.6.0",
"prettier": "^1.14.3",
"prettier-eslint": "^8.8.2"
Expand Down
Loading

0 comments on commit 1de10fc

Please sign in to comment.