build: use github actions to release

vr
mob-sakai 2020-05-01 01:04:19 +09:00
parent fa53ace4e0
commit 68b94fbdcb
8 changed files with 6599 additions and 80 deletions

View File

@ -1,23 +0,0 @@
---
name: Bug report
about: Create a report to help us improve
---
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Environment (please complete the following information):**
- Platform: [e.g. Editor(Windows/Mac), Standalone(Windows/Mac), iOS, Android, WebGL]
- Unity: [e.g. 2018.2.8f1]
- SoftMaskForUGUI: [e.g. v1.0.0]
**Additional context**
Add any other context, screenshots or gif animations about the bug here.

View File

@ -1,17 +0,0 @@
---
name: Feature request
about: Suggest an idea for this project
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context, screenshots or gif animations about the feature request here.

View File

@ -1,16 +0,0 @@
---
name: Question
about: Feel free to ask us any question.
---
**Describe the question**
A clear and concise description of what the question is.
**Environment (please complete the following information):**
- Platform: [e.g. Editor(Windows/Mac), Standalone(Windows/Mac), iOS, Android, WebGL]
- Unity: [e.g. 2018.2.8f1]
- SoftMaskForUGUI: [e.g. v1.0.0]
**Additional context**
Add any other context, screenshots or gif animations about the question here.

31
.github/workflows/release.yml vendored Normal file
View File

@ -0,0 +1,31 @@
name: release
on:
push:
branches:
- preview
- master
- v*.x
jobs:
prepare:
runs-on: ubuntu-latest
if: "! contains(github.event.head_commit.message, '[ci skip]')"
steps:
- run: echo "${{ github.event.head_commit.message }}"
release:
runs-on: ubuntu-latest
needs: prepare
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v1
with:
path: ~/.npm
key: ${{ runner.os }}-node
- run: npm run release
env:
NPM_TOKEN: ${{secrets.NPM_TOKEN}}
GH_TOKEN: ${{secrets.GH_TOKEN}}

View File

@ -1,3 +0,0 @@
issues-wo-labels=false
pr-wo-labels=false
exclude_labels=duplicate,question,invalid,wontfix,Duplicate,Question,Invalid,Wontfix,Meta: Exclude From Changelog

6516
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,18 +1,54 @@
{ {
"name": "com.coffee.softmask-for-ugui", "name": "release-upm",
"displayName": "Soft Mask For uGUI", "description": "To release upm package, execute `npm run release` on bash.",
"description": "SoftMask is a smooth masking component for uGUI elements in Unity.\nBy using SoftMask instead of default Mask, rounded edges of UI elements can be expressed beautifully.", "version": "1.0.0",
"version": "0.9.1", "devDependencies": {
"unity": "2017.1", "git-snapshot": "^2.2.0",
"license": "MIT", "@semantic-release/changelog": "^5.0.0",
"repository": { "@semantic-release/git": "^9.0.0",
"type": "git", "@semantic-release/exec": "^5.0.0",
"url": "git+https://github.com/mob-sakai/SoftMaskForUGUI.git" "semantic-release": "^17.0.2"
}, },
"src": "Assets/Coffee/UIExtensions/SoftMaskForUGUI", "scripts": {
"author": "mob-sakai <sakai861104@gmail.com> (https://github.com/mob-sakai)", "release": "npm ci && cd `find Packages/*/.releaserc -exec dirname {} +` && npx semantic-release",
"editorOnly": false, "release:debug": "npm run release -- --dry-run --no-ci --debug"
"upmSupport": true, },
"dependencies": { "release": {
} "branches": [
"+([0-9])?(.{+([0-9]),x}).x",
"master",
{
"name": "preview",
"prerelease": true
}
],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/changelog",
[
"@semantic-release/npm",
{
"npmPublish": false,
"tarballDir": "."
}
],
"@semantic-release/git",
[
"@semantic-release/github",
{
"assets": [
"*.tgz"
]
}
],
[
"@semantic-release/exec",
{
"verifyReleaseCmd": "test -d Samples && mv Samples Samples~ && rm -f Samples.meta || exit 0",
"publishCmd": "tar -xzvf *.tgz && git snapshot --prefix=package --branch=upm --remote=${options.repositoryUrl} --tag=${nextRelease.version} --message=\"${nextRelease.version}\n\n${nextRelease.notes}\""
}
]
]
}
} }

View File

@ -1,5 +0,0 @@
#!/bin/bash -e
# NOTE: Set an environment variable `CHANGELOG_GITHUB_TOKEN` by running the following command at the prompt, or by adding it to your shell profile (e.g., ~/.bash_profile or ~/.zshrc):
# export CHANGELOG_GITHUB_TOKEN="«your-40-digit-github-token»"
bash <(curl -sL 'https://gist.github.com/mob-sakai/e281baa04e1a47148b62387f9c7967df/raw/unity_release.sh')