Skip to content

Commit

Permalink
chore: auto publish package on release (#62)
Browse files Browse the repository at this point in the history
Co-authored-by: Romain <romain.billot@harvestr.io>
  • Loading branch information
IzioDev and Romain authored Aug 29, 2023
1 parent a3d0ff9 commit 0cfb340
Showing 1 changed file with 47 additions and 0 deletions.
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

0 comments on commit 0cfb340

Please # to comment.