Skip to content

Feature/idp 1614 create hello world package #1

Feature/idp 1614 create hello world package

Feature/idp 1614 create hello world package #1

Workflow file for this run

name: Publish
# on:
# push:
# branches: ["main"]
# tags: ["*.*.*"]
# paths-ignore: ["*.md"]
on:
pull_request:
branches: [main]
paths-ignore: ["*.md"]
env:
CI: true
# Pnpm setup based on https://github.com/pnpm/action-setup#use-cache-to-reduce-installation-time
jobs:
version:
runs-on: ubuntu-latest
permissions:
id-token: write # required for provenance https://docs.npmjs.com/generating-provenance-statements#publishing-packages-with-provenance-via-github-actions
contents: write
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install Node.js
uses: actions/setup-node@v3
- name: Install pnpm
uses: pnpm/action-setup@v2
id: pnpm-install
with:
version: 8
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- name: Setup pnpm cache
uses: actions/cache@v3
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install Dependencies
run: pnpm i --frozen-lockfile
- name: Publish to NPM
run: pnpm run release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.WORKLEAP_NPM_TOKEN }}