Skip to content

Add release workflow #32

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Release

on: [push]

jobs:
release:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.head_commit.message, 'skip ci')"
steps:
- uses: actions/checkout@v2

- name: Prepare repository
run: git fetch --unshallow --tags

- name: Use Node.js 14.x
uses: actions/setup-node@v1
with:
node-version: 14.x

- name: Cache node modules
uses: actions/cache@v1
with:
path: node_modules
key: yarn-deps-${{ hashFiles('yarn.lock') }}
restore-keys: |
yarn-deps-${{ hashFiles('yarn.lock') }}

- name: Create Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
yarn install --frozen-lockfile
yarn build
yarn release
11 changes: 7 additions & 4 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
{
"version": "0.3.0-next.0",
"npmClient": "yarn",
"packages": [
"packages/*"
],
"useWorkspaces": true
"packages": ["packages/*"],
"useWorkspaces": true,
"command": {
"publish": {
"verifyAccess": false
}
}
}
12 changes: 11 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,20 @@
"watch": "lerna run --since HEAD --parallel x -- watch",
"watch-package": "lerna run --scope @*/mini-frame --include-dependencies --parallel x -- watch",
"watch-all": "lerna run --parallel x -- watch",
"storybook": "lerna run --scope storybook start --stream"
"storybook": "lerna run --scope storybook start --stream",
"release": "auto shipit"
},
"devDependencies": {
"auto": "^10.18.4",
"lerna": "^4.0.0"
},
"repository": "code-hike/codehike",
"author": "pomber <[email protected]>",
"auto": {
"plugins": [
"npm",
"released"
],
"onlyPublishWithReleaseLabel": false
}
}
2 changes: 0 additions & 2 deletions packages/script/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ function build(args) {
"rollup.config.js"
)

// console.log({ configPath, cwd: process.cwd(), args: process.argv.slice(2) });

spawn("yarn", ["rollup", "-c", configPath, ...args], {
stdio: "inherit",
// cwd: "foo"
Expand Down