chore: correct repository URL to the full and accurate format #11
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "🚀 CD — Publish" | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
permissions: | |
contents: write | |
pull-requests: write | |
id-token: write | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
if: github.event.repository.fork == false | |
name: 🚀 Release | |
steps: | |
- uses: pnpm/action-setup@v4 | |
with: | |
version: "9.15.0" | |
- name: 🔖 Release on Github | |
uses: google-github-actions/release-please-action@v3 | |
id: release | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
release-type: node | |
package-name: tusk | |
changelog-path: "CHANGELOG.md" | |
path: "packages/tusk" | |
- name: 📥 Checkout | |
uses: actions/checkout@v4 | |
if: ${{ steps.release.outputs.release_created }} | |
- name: 👷 Setup Node.js | |
uses: actions/setup-node@v4 | |
if: ${{ steps.release.outputs.release_created }} | |
with: | |
node-version: "22.x" | |
registry-url: "https://registry.npmjs.org" | |
- name: 🎯 Cache pnpm dependencies | |
uses: actions/cache@v4 | |
with: | |
path: ~/.pnpm-store | |
key: pnpm-linux-${{ matrix.node-version }}-${{ hashFiles('packages/tusk/pnpm-lock.yaml') }} | |
restore-keys: | | |
pnpm-linux-${{ matrix.node-version }}- | |
pnpm-linux- | |
- name: 📦 Install Dependencies | |
if: ${{ steps.release.outputs.release_created }} | |
run: | | |
cd packages/tusk | |
pnpm install | |
- name: 🏗️ Build | |
if: ${{ steps.release.outputs.release_created }} | |
run: | | |
cd packages/tusk | |
pnpm run build | |
- name: 🚀 Publish Package | |
if: ${{ steps.release.outputs.release_created }} | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
run: | | |
cd packages/tusk | |
pnpm run publish --access public |