Skip to content

Commit

Permalink
feat: add sem releases to actions repo
Browse files Browse the repository at this point in the history
  • Loading branch information
FoSix committed Sep 28, 2022
1 parent 0589ebe commit e4990df
Show file tree
Hide file tree
Showing 2 changed files with 79 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/actions_release_ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Actions Release CI
run-name: Actions Release CI

permissions:
contents: write
issues: read

on:
push:
branches: [main]

jobs:
release:
name: Semantic release
runs-on: ubuntu-latest
steps:
- name: checkout code
uses: actions/checkout@v3

- name: sem release
id: rc
uses: cycjimmy/semantic-release-action@v3
with:
semantic_version: 19.0
extra_plugins: |
conventional-changelog-conventionalcommits@^5.0.0
@semantic-release/git@^10.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: release info
run: |
echo new_release_published - ${{ steps.rc.outputs.new_release_published }}
echo new_release_version - ${{ steps.rc.outputs.new_release_version }}
echo last_release_version - ${{ steps.rc.outputs.last_release_version }}
44 changes: 44 additions & 0 deletions .releaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"branches": [
"main"
],
"plugins": [
[
"@semantic-release/commit-analyzer",
{
"releaseRules": [
{
"breaking": true,
"release": "minor"
},
{
"type": "feat",
"release": "patch"
},
{
"type": "feat",
"scope" : "MAJOR",
"release": "major"
}
]
}
],
"@semantic-release/release-notes-generator",
[
"@semantic-release/git",
{
"assets": [
"README.md"
],
"message": "chore(release): ${nextRelease.version}\n\n${nextRelease.notes}"
}
],
[
"@semantic-release/github",
{
"successComment": ":tada: This ${issue.pull_request ? 'PR is included' : 'issue has been resolved'} in version ${nextRelease.version} :tada:\n\nThe release is available on [Terraform Registry](https://registry.terraform.io/modules/PaloAltoNetworks/vmseries-modules/azurerm/latest) and [GitHub release](../releases/tag/v${nextRelease.version})\n\n> Posted by [semantic-release](https://github.com/semantic-release/semantic-release) bot"
}
]
],
"preset": "conventionalcommits"
}

0 comments on commit e4990df

Please sign in to comment.