Skip to content

Commit

Permalink
fix: update release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
mob-sakai committed Jan 30, 2020
1 parent 689bde9 commit 9026765
Show file tree
Hide file tree
Showing 5 changed files with 138 additions and 68 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,18 @@ on:
branches:
- preview
- master
tags:
- '!*'
- 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

Expand All @@ -19,8 +25,6 @@ jobs:
path: ~/.npm
key: ${{ runner.os }}-node

- run: npm ci

- run: npm run release
env:
NPM_TOKEN: ${{secrets.NPM_TOKEN}}
Expand Down
23 changes: 16 additions & 7 deletions Packages/com.coffee.open-sesame-compiler/.npmignore
Original file line number Diff line number Diff line change
@@ -1,14 +1,23 @@
!*~
# Windows
Thumbs.db
Desktop.ini

# macOS
.DS_Store

# VS
.vs/
.vscode/
*.sln
obj/
bin/

# NPM
node_modules/

# package
Editor/Coffee.OpenSesame/*
Editor/Coffee.OpenSesame.meta
Editor/Coffee.OpenSesame.Dev/*
Editor/Coffee.OpenSesame.Dev.meta

obj/
bin/
Tests/
Tests.meta
*.tgz
.releaserc
Empty file.
142 changes: 95 additions & 47 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 19 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
{
"name": "release-to-upm",
"description": "To release upm package: npm ci && npx semantic-release",
"name": "release-upm",
"description": "Execute `npm run release` on bash to release upm package.",
"version": "1.0.0",
"devDependencies": {
"git-snapshot": "^2.2.0",
"@semantic-release/changelog": "^4.0.0",
"@semantic-release/git": "^8.0.0",
"@semantic-release/exec": "^4.0.0",
"semantic-release": "^16.0.0"
"@semantic-release/changelog": "^5.0.0",
"@semantic-release/git": "^9.0.0",
"@semantic-release/exec": "^5.0.0",
"semantic-release": "^17.0.0"
},
"pkg": "Packages/com.coffee.open-sesame-compiler",
"scripts": {
"release": "cd $npm_package_pkg && npx semantic-release"
"release": "npm ci && cd `find Packages/*/.releaserc -exec dirname {} +` && npx semantic-release",
"release:debug": "npm run release -- --dry-run --no-ci --debug"
},
"release": {
"branches": [
"+([0-9])?(.{+([0-9]),x}).x",
"master",
{
"name": "preview",
Expand All @@ -25,19 +26,27 @@
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/changelog",
"@semantic-release/git",
[
"@semantic-release/npm",
{
"npmPublish": false,
"tarballDir": "."
}
],
"@semantic-release/git",
[
"@semantic-release/github",
{
"assets": [
"*.tgz"
]
}
],
[
"@semantic-release/exec",
{
"prepareCmd": "tar -xzvf *.tgz",
"publishCmd": "git snapshot -p package -b upm -r ${options.repositoryUrl} -t ${nextRelease.version} -m \"${nextRelease.notes}\""
"publishCmd": "git snapshot --prefix=package --branch=upm --remote=${options.repositoryUrl} --tag=${nextRelease.version} --message=\"${nextRelease.notes}\""
}
]
]
Expand Down

0 comments on commit 9026765

Please sign in to comment.