Skip to content

Commit

Permalink
Merge pull request #90 from lidofinance/feature/release-workflow
Browse files Browse the repository at this point in the history
Release Workflow
  • Loading branch information
kolyasapphire authored May 18, 2021
2 parents 0a447a2 + 933b0e4 commit d4530e4
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 2 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Publish
on:
release:
types: [created]

jobs:
test-components:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Set up node
uses: actions/setup-node@v2
with:
node-version: '12.x'
registry-url: 'https://registry.npmjs.org'
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
- name: Cache Yarn
id: yarn-cache
uses: actions/cache@v2
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
run: yarn install --immutable
- name: Run lint
run: yarn lint
- name: Build Components
run: yarn build
- name: Run tests
run: yarn test
- name: Publish packages
run: yarn publish:submit
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@
"g:types": "cd $INIT_CWD && tsc",
"test": "jest",
"test:coverage": "jest coverage",
"publish": "yarn build && yarn test && yarn publish:submit",
"publish:submit": "yarn workspaces foreach -p -i -v -t --exclude lido-ui-components npm publish --tolerate-republish",
"publish:submit": "yarn workspaces foreach -piv --topological-dev --exclude lido-ui-components npm publish --tolerate-republish",
"lint": "eslint --ext ts,tsx,js,jsx --ignore-path .gitignore .",
"postinstall": "husky install"
},
Expand Down

0 comments on commit d4530e4

Please sign in to comment.