Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

chore: auto publish package on release #62

Merged
merged 1 commit into from
Aug 29, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: 🚀 Publish

on:
release:
types: [created]

jobs:
publish-npm:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
packages: write
steps:
- name: ⬇️ Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 18.x

- uses: pnpm/action-setup@v2
name: Install pnpm
id: pnpm-install
with:
version: 8
run_install: false

- name: Install Dependencies
run: pnpm install --frozen-lockfile --strict-peer-dependencies

- name: Build
run: pnpm build

- name: 📝 Version
env:
TAG_NAME: ${{ github.event.release.tag_name }}
run: pnpm version ${TAG_NAME} --no-git-tag-version

- name: 🐙 Publish
env:
NODE_AUTH_TOKEN: ${{ secrets.REGISTRY_TOKEN }}
run: |
pnpm publish --no-git-checks