Skip to content
This repository has been archived by the owner on Mar 1, 2023. It is now read-only.

Commit

Permalink
fix: added semantic-release
Browse files Browse the repository at this point in the history
  • Loading branch information
prisis committed Mar 3, 2021
1 parent a4e5a11 commit c8ec6c2
Show file tree
Hide file tree
Showing 3 changed files with 99 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/semantic-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions

name: "Semantic Release"

on:
push:
branches:
- ([0-9])?(.{+([0-9]),x}).x
- main
- next
- next-major
- alpha
- beta

jobs:
semantic-release:
name: "Semantic Release"

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: "Semantic Release"
uses: cycjimmy/semantic-release-action@v2
with:
semantic_version: 17.0.7
extra_plugins: |
@semantic-release/changelog@^5.0.1
@semantic-release/git@^9.0.0
@google/semantic-release-replace-plugin@^1.0.0
conventional-changelog-conventionalcommits@^4.3.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5 changes: 5 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@
"preferred-install": "dist",
"sort-packages": true
},
"extra": {
"branch-alias": {
"dev-master": "*"
}
},
"autoload-dev": {
"psr-4": {
"": "bin"
Expand Down
60 changes: 60 additions & 0 deletions release.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
module.exports = {
"branches": [
"+([0-9])?(.{+([0-9]),x}).x",
"main",
"next",
"next-major",
{
"name": "beta",
"prerelease": true
},
{
"name": "alpha",
"prerelease": true
}
],
"dryRun": false,
"plugins": [
[
"@semantic-release/commit-analyzer",
{
"preset": "conventionalcommits"
}
],
[
"@google/semantic-release-replace-plugin",
{
"replacements": [
{
"files": [
"composer.json"
],
"from": "\"dev-master\": \".*\"",
"to": "\"dev-master\": \"${nextRelease.version.replace(/\\.\\w+$/, '-dev')}\"",
}
]
}
],
[
"@semantic-release/release-notes-generator",
{
"preset": "conventionalcommits"
}
],
"@semantic-release/changelog",
"@semantic-release/github",
[
"@semantic-release/git",
{
"assets": [
"composer.json",
"src/*",
"UPGRADE.md",
"LICENSE.md",
"CHANGELOG.md"
],
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}
]
]
}

0 comments on commit c8ec6c2

Please sign in to comment.