Skip to content

Commit

Permalink
fix: add semantics
Browse files Browse the repository at this point in the history
  • Loading branch information
Tr0sT committed May 17, 2020
1 parent f125fdd commit 98bc0d3
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 4 deletions.
25 changes: 21 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,24 @@ on:
branches:
- master
jobs:
split-upm:
name: split upm branch (force)
release:
name: release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: split upm branch
- name: Semantic release
id: semantic
uses: cycjimmy/semantic-release-action@v2
with:
extra_plugins: |
@semantic-release/changelog
@semantic-release/git
branch: master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create upm branch
run: |
git branch -d upm &> /dev/null || echo upm branch not found
git subtree split -P "$PKG_ROOT" -b upm
Expand All @@ -25,4 +35,11 @@ jobs:
fi
git push -f -u origin upm
env:
PKG_ROOT: Assets/com.nuclearband.windowsmanager
PKG_ROOT: Assets/com.nuclearband.windowsmanager
- name: Create upm git tag
if: steps.semantic.outputs.new_release_published == 'true'
run: |
git tag $TAG upm
git push origin --tags
env:
TAG: upm/v${{ steps.semantic.outputs.new_release_version }}
14 changes: 14 additions & 0 deletions .releaserc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"tagFormat": "v${version}",
"plugins": [
["@semantic-release/commit-analyzer", { "preset": "angular" }],
"@semantic-release/release-notes-generator",
["@semantic-release/changelog", { "preset": "angular" }],
["@semantic-release/npm", { "npmPublish": false, "pkgRoot": "Assets/com.nuclearband.windowsmanager" }],
["@semantic-release/git", {
"assets": ["Assets/com.nuclearband.windowsmanager/package.json", "Assets/com.nuclearband.windowsmanager/CHANGELOG.md"],
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}],
"@semantic-release/github"
]
}

0 comments on commit 98bc0d3

Please sign in to comment.