Skip to content

Commit

Permalink
chore: Add NPM package publishing workflow.
Browse files Browse the repository at this point in the history
  • Loading branch information
dvuckovic committed Apr 7, 2024
1 parent 4760abf commit baa5f6e
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion .github/workflows/test.yml → .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: test
name: ci

# Controls when the action will run.
# Triggers the workflow on all pushes, except on tag creation.
Expand Down Expand Up @@ -28,9 +28,32 @@ jobs:
- name: Test ✅
run: yarn coverage

build:
runs-on: ubuntu-latest
needs: test
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4

- name: Setup 🔧
uses: actions/setup-node@v4
with:
node-version: '20'
cache: yarn
registry-url: https://registry.npmjs.org

- name: Install 📦
run: yarn install --frozen-lockfile

- name: Build ⚙️
run: yarn build

- name: Publish 📜
if: github.ref == 'refs/heads/main' && github.event.type == 'release' && github.event.action == 'published'
run: yarn publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Pack 🎁
run: yarn pack

Expand Down

0 comments on commit baa5f6e

Please sign in to comment.