Skip to content
Permalink
Browse files

feat: deploy semantic-release

  • Loading branch information
favoyang committed Jan 10, 2020
1 parent ea7b90a commit d1c4c1b79117b4eab55021d2485c606a2d9f4974
Showing with 84 additions and 1 deletion.
  1. +54 −0 .github/workflows/ci.yml
  2. +4 −0 .gitignore
  3. +3 −0 .npmignore
  4. +14 −0 .releaserc.json
  5. +9 −1 package.json
@@ -0,0 +1,54 @@
name: CI

on:
push:
branches:
- master

jobs:
release:
name: release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

- name: semantic-release
uses: cycjimmy/semantic-release-action@v2
with:
extra_plugins: |
@semantic-release/changelog@3.0.0
@semantic-release/git@7.0.18
branch: master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# - name: Split upm branch
# run: |
# echo '### head info'
# git log -1

# echo '### delete local upm branch'
# git branch -d upm &> /dev/null || echo local upm branch not found
# echo

# echo '### split upm branch'
# git subtree split -P "$PKG_ROOT" -b upm

# echo '### checkout upm branch'
# git checkout upm

# if [[ -d "Samples" ]]; then
# echo '### move Samples => Samples~'
# git mv Samples Samples~
# rm -f Samples.meta
# git config --global user.name 'github-bot'
# git config --global user.email 'github-bot@users.noreply.github.com'
# git commit -am "fix: Samples => Samples~"
# fi

# echo '### force overwrite remote upm branch'
# git push -f -u origin upm
# env:
# PKG_ROOT: PATH_TO_PKG
@@ -35,3 +35,7 @@ sysinfo.txt
# Builds
*.apk
*.unitypackage

# npm
node_modules
package-lock.json
@@ -0,0 +1,3 @@
.all-contributorsrc
.github
.releaserc.json
@@ -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": "." }],
["@semantic-release/git", {
"assets": ["package.json", "CHANGELOG.md"],
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}],
"@semantic-release/github"
]
}
@@ -12,5 +12,13 @@
"url": "https://github.com/favoyang"
},
"repository": "https://github.com/favoyang/unity-addressable-importer.git",
"license": "MIT"
"license": "MIT",
"scripts": {
"semantic-release": "semantic-release"
},
"devDependencies": {
"@semantic-release/changelog": "^3.0.6",
"@semantic-release/git": "^7.0.18",
"semantic-release": "^15.14.0"
}
}

0 comments on commit d1c4c1b

Please sign in to comment.
You can’t perform that action at this time.