-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add sem releases to actions repo
- Loading branch information
Showing
2 changed files
with
79 additions
and
0 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 |
---|---|---|
@@ -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 }} |
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,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" | ||
} |