Skip to content

Commit

Permalink
Auto Publish Packages
Browse files Browse the repository at this point in the history
  • Loading branch information
r4881t committed Sep 10, 2023
1 parent 09bb29d commit 9337243
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,33 @@ jobs:
- name: Install dependencies
run: yarn --frozen-lockfile
- run: npm test

publish-npm:
needs: build
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.ref == 'refs/heads/main'

strategy:
matrix:
node-version: [ 18.x]

steps:
- uses: actions/checkout@v3

- name: Uses Nodejs ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
registry-url: https://registry.npmjs.org/

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT

- name: Install dependencies
run: yarn install --immutable

- name: Publish npmjs packages
run: ./scripts/npm-publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

0 comments on commit 9337243

Please sign in to comment.