Skip to content

Commit

Permalink
fix: add release automation via semantic-release-bot
Browse files Browse the repository at this point in the history
  • Loading branch information
slauger committed Sep 18, 2020
1 parent dc15ddf commit 19bb5d1
Show file tree
Hide file tree
Showing 4 changed files with 77 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Release
on:
push:
branches:
- master
jobs:
release:
name: Release
if: "!contains(github.event.head_commit.message, 'skip ci')"
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: 12
- name: Install dependencies
run: yarn install
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npx semantic-release
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
check_netscaler
bats-core
node_modules
yarn.lock
39 changes: 39 additions & 0 deletions .releaserc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
["@semantic-release/changelog", {
"changelogFile": "CHANGELOG.md"
}],
[
"@google/semantic-release-replace-plugin",
{
"replacements": [
{
"files": [
"check_netscaler.pl"
],
"from": "v1.[0-9]+.[0-9]+",
"to": "v${nextRelease.version}",
"results": [
{
"file": "check_netscaler.pl",
"hasChanged": true,
"numMatches": 2,
"numReplacements": 2
}
],
"countMatches": true
}
]
}
],
["@semantic-release/git", {
"assets": ["CHANGELOG.md", "check_netscaler.pl"],
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}],
["@semantic-release/github", {
"assets": []
}]
]
}
11 changes: 11 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"dependencies": {
"@google/semantic-release-replace-plugin": "^1.0.0",
"@semantic-release/changelog": "semantic-release/changelog",
"@semantic-release/commit-analyzer": "semantic-release/commit-analyzer",
"@semantic-release/git": "9.0.0",
"@semantic-release/github": "^7.1.1",
"@semantic-release/release-notes-generator": "semantic-release/release-notes-generator",
"semantic-release": "17.1.1"
}
}

0 comments on commit 19bb5d1

Please sign in to comment.