Skip to content

tests npm publish

tests npm publish #2

Workflow file for this run

name: Publish Prerelease
on:
push:
branches: ["develop"]
workflow_dispatch:
jobs:
publish:
name: Version and publish
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
strategy:
matrix:
node-version: [20.x]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
cache-dependency-path: "**/package-lock.json"
- name: Cache or restore dependencies
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: ${{ runner.os }}-npm-
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Publish to pkg.pr.new
run: npx pkg-pr-new publish
# - name: Configure Git
# uses: oleksiyrudenko/gha-git-credentials@v2-latest
# with:
# token: '${{ secrets.GITHUB_TOKEN }}'
# - name: Release-It
# run: |
# npm run release -- --preRelease=development --'hooks.after:bump='