Skip to content

Instantly share code, notes, and snippets.

@esnya
Last active March 11, 2021 12:53
Show Gist options
  • Save esnya/3f401c3aae2d74c0fa99804faf625c06 to your computer and use it in GitHub Desktop.
Save esnya/3f401c3aae2d74c0fa99804faf625c06 to your computer and use it in GitHub Desktop.
Release Unitypackage
name: Release Unity Package
on:
- push
jobs:
prebuild:
runs-on: ubuntu-latest
outputs:
package_name: ${{steps.package_name.outputs.package_name}}
steps:
- id: package_name
#run: echo "::set-output name=package_name::$(echo ${GITHUB_REPOSITORY##*/}-${GITHUB_REF##*/})"
run: echo "::set-output name=package_name::$(echo ${GITHUB_REPOSITORY##*/})"
release:
needs: prebuild
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: 12
- name: Install dependencies
run: npm ci
- run: |
find Assets -name \*.meta > metaList
mkdir dist
cat metaList
- uses: pCYSl5EDgo/create-unitypackage@master
with:
package-path: 'dist/${{needs.prebuild.outputs.package_name}}.unitypackage'
include-files: metaList
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npx semantic-release
{
"name": "node_modules",
"references": [
],
"optionalUnityReferences": [],
"includePlatforms": [],
"excludePlatforms": [
"Android",
"Editor",
"iOS",
"LinuxStandalone32",
"LinuxStandalone64",
"LinuxStandaloneUniversal",
"Lumin",
"macOSStandalone",
"PS4",
"Switch",
"tvOS",
"WSA",
"WebGL",
"WindowsStandalone32",
"WindowsStandalone64",
"XboxOne"
],
"allowUnsafeCode": false,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": fale,
"defineConstraints": []
}
{
"name": "com.nekometer.<PackageName>",
"displayName": "<DisplayName>",
"version": "0.0.0",
"private": true,
"description": "<Description>",
"keywords": [
"Unity",
"ShaderLab",
"Shader"
],
"homepage": "https://github.com/esnya/<RepositoryName>#readme",
"bugs": {
"url": "https://github.com/esnya/<RepositoryName>/issues"
},
"repository": {
"type": "git",
"url": "git+https://github.com/esnya/<RepositoryName>.git"
},
"license": "MIT",
"author": "esnya",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"husky": {
"hooks": {
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
}
},
"commitlint": {
"extends": [
"gitmoji"
]
},
"devDependencies": {
"@commitlint/cli": "^11.0.0",
"@commitlint/config-conventional": "^11.0.0",
"@commitlint/core": "^11.0.0",
"@semantic-release/github": "^7.2.0",
"commitlint-config-gitmoji": "^2.1.10",
"husky": "^4.3.8",
"semantic-release": "^17.3.7",
"semantic-release-gitmoji": "^1.3.4"
},
"release": {
"branches": [
"master",
{
"name": "next",
"prerelease": true
},
{
"name": "beta",
"prerelease": true
},
{
"name": "alpha",
"prerelease": true
}
],
"plugins": [
"semantic-release-gitmoji",
[
"@semantic-release/github",
{
"assets": {
"path": "dist/"
}
}
]
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment