Skip to content

Commit

Permalink
feat(semantic-release): add semantic-release
Browse files Browse the repository at this point in the history
  • Loading branch information
Orkuncakilkaya committed Oct 20, 2023
1 parent 4229fe5 commit 7fad6d7
Show file tree
Hide file tree
Showing 3 changed files with 179 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Users referenced in this file will automatically be requested as reviewers for PRs that modify the given paths.
# See https://help.github.com/articles/about-code-owners/

* @Orkuncakilkaya @necipallef
39 changes: 39 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Release

on:
workflow_dispatch:


jobs:
release:
name: Release new version
environment: production
runs-on: ubuntu-latest

if: github.ref_protected == true

steps:
- name: Checkout
uses: actions/checkout@v3
with:
persist-credentials: false
fetch-depth: 0

- name: Install node
uses: actions/setup-node@v3
with:
node-version-file: '.node-version'

- name: Install Node packages
run: yarn install
- name: Build
run: yarn build --type all
- name: Semantic Release
uses: cycjimmy/semantic-release-action@91ab76a4a393a8d0c4739e9aea1818b56bc953ea
with:
extra_plugins: |
@semantic-release/[email protected]
[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GH_RELEASE_TOKEN }}
HUSKY: 0
136 changes: 136 additions & 0 deletions .releaserc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
{
"branches":[
"main"
],
"plugins":[
[
"@semantic-release/commit-analyzer",
{
"releaseRules":[
{
"type":"build",
"scope":"deps",
"release":"patch"
},
{
"type":"docs",
"scope":"README",
"release":"patch"
}
]
}
],
[
"@semantic-release/release-notes-generator",
{
"preset":"conventionalCommits",
"presetConfig":{
"types":[
{
"type":"feat",
"section":"Features"
},
{
"type":"feature",
"section":"Features"
},
{
"type":"fix",
"section":"Bug Fixes"
},
{
"type":"perf",
"section":"Performance Improvements"
},
{
"type":"revert",
"section":"Reverts"
},
{
"type":"docs",
"scope":"README",
"section":"Documentation"
},
{
"type":"build",
"scope":"deps",
"section":"Build System"
},
{
"type":"docs",
"section":"Documentation",
"hidden":true
},
{
"type":"style",
"section":"Styles",
"hidden":true
},
{
"type":"chore",
"section":"Miscellaneous Chores",
"hidden":true
},
{
"type":"refactor",
"section":"Code Refactoring",
"hidden":true
},
{
"type":"test",
"section":"Tests",
"hidden":true
},
{
"type":"build",
"section":"Build System",
"hidden":true
},
{
"type":"ci",
"section":"Continuous Integration",
"hidden":true
}
]
}
}
],
"@semantic-release/changelog",
[
"@semantic-release/npm",
{
"npmPublish":false
}
],
[
"@semantic-release/exec",
{
"prepareCmd":"yarn build --type all"
}
],
[
"@semantic-release/git",
{
"assets":[
"CHANGELOG.md",
"package.json"
]
}
],
[
"@semantic-release/github",
{
"assets":[
{
"path":"dist/terraform/json/fingerprint.json",
"label":"fingerprint-property-rules-for-terraform.json"
},
{
"path":"dist/terraform/json/variables.json",
"label":"fingerprint-property-variables-for-terraform.json"
}
]
}
]
]
}

0 comments on commit 7fad6d7

Please sign in to comment.