v3.0.10 #41
Workflow file for this run
This file contains 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: 📦 Publish xdeployer to npm | |
on: | |
release: | |
types: [published] | |
workflow_dispatch: | |
jobs: | |
publish: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: | |
- ubuntu-latest | |
node_version: | |
- 20 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install pnpm | |
uses: pnpm/action-setup@v3 | |
with: | |
version: latest | |
run_install: false | |
- name: Get pnpm cache directory path | |
id: pnpm-cache-dir-path | |
run: echo "dir=$(pnpm store path --silent)" >> $GITHUB_OUTPUT | |
- name: Restore pnpm cache | |
uses: actions/cache@v4 | |
id: pnpm-cache | |
with: | |
path: ${{ steps.pnpm-cache-dir-path.outputs.dir }} | |
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-pnpm-store- | |
- name: Setup .npmrc file to publish to npm | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node_version }} | |
registry-url: "https://registry.npmjs.org" | |
- name: Install pnpm project with a clean slate | |
run: pnpm install --prefer-offline --frozen-lockfile | |
- name: Publish to npm | |
run: pnpm publish --no-git-checks | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |