Skip to content

Commit

Permalink
feat: added publish
Browse files Browse the repository at this point in the history
  • Loading branch information
Proximitynow19 committed Jun 15, 2021
1 parent 54067aa commit 57084cf
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 12 deletions.
37 changes: 26 additions & 11 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@ name: Node.js CI

on:
push:
branches: [ stable ]
branches: [stable]
pull_request:
branches: '*'
branches: "*"

jobs:
quality:

runs-on: ${{ matrix.os }}

strategy:
Expand All @@ -21,11 +20,27 @@ jobs:
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run build --if-present
- run: npm test
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run build --if-present
- run: npm test

publish:
runs-on: ubuntu-latest
if: ${{ github.ref == 'ref/heads/stable' }}
needs: quality
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run semantic-release
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@
"dev": "npm run build && npm test",
"docs": "npx typedoc --plugin typedoc-plugin-extras --excludePrivate --favicon 'images/small.png' --hideDate --hideTime && echo 'tetr.js.org' > docs/CNAME",
"semantic-release": "semantic-release --branches stable",
"commit": "git-cz"
"commit": "git-cz",
"acp": "git add . && npm run commit && git push"
},
"config": {
"commitizen": {
Expand Down

0 comments on commit 57084cf

Please sign in to comment.