Skip to content

Commit

Permalink
Merge pull request #101 from storybookjs/yann/setup-auto-release
Browse files Browse the repository at this point in the history
Add auto release
  • Loading branch information
yannbf authored Aug 21, 2023
2 parents a25586b + 39fab2d commit 244df7c
Show file tree
Hide file tree
Showing 5 changed files with 1,011 additions and 9 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
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 16.x
uses: actions/setup-node@v1
with:
node-version: 16.x

- name: Install dependencies
run: yarn

- name: Create Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
yarn release
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ node_modules
*.log
dist
.idea
.env
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,14 @@ All contributions are welcome!

### run tests:

first, build the package:

```sh
yarn build
```

then run the tests:

```sh
yarn test
```
11 changes: 10 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@
"prepublish": "yarn build",
"test": "yarn test-node && yarn test-browser",
"test-browser": "TZ=UTC jest --env=jsdom ./common ./browser",
"test-node": "TZ=UTC jest --env=node ./common ./node"
"test-node": "TZ=UTC jest --env=node ./common ./node",
"release": "yarn build && auto shipit"
},
"eslintConfig": {
"env": {
Expand All @@ -54,12 +55,14 @@
"memoizerific": "^1.11.3"
},
"devDependencies": {
"@auto-it/released": "^11.0.1",
"@babel/preset-env": "^7.20.0",
"@babel/preset-typescript": "^7.18.6",
"@storybook/eslint-config-storybook": "^3.1.2",
"@types/is-function": "^1.0.0",
"@types/jest": "^26.0.22",
"@types/lodash-es": "^4.17.6",
"auto": "^11.0.1",
"babel-core": "7.0.0-bridge.0",
"babel-jest": "^26.6.3",
"common-tags": "^1.8.0",
Expand All @@ -77,5 +80,11 @@
},
"publishConfig": {
"access": "public"
},
"auto": {
"plugins": [
"npm",
"released"
]
}
}
Loading

0 comments on commit 244df7c

Please sign in to comment.