Skip to content

NPM Canary Publish

NPM Canary Publish #4

Workflow file for this run

name: NPM Canary Publish
on:
workflow_dispatch:
inputs:
version:
description: 'Package version'
required: false
type: string
lib-name:
description: 'Library Package name'
required: false
type: string
default: '@canary-109cafe/jbpr-lib'
bin-name:
description: 'Binary Package name'
required: false
type: string
default: '@canary-109cafe/jbpr'
jobs:
build:
uses: xc2/ghwf/.github/workflows/pnpm-artifact.yaml@main
with:
script: 'ci:pack'
artifact-path: "dist/*/*.tgz"
artifact-name: pkg
publish:
runs-on: ubuntu-latest
environment: npm-canary
needs: build
name: Publish ${{ matrix.pkg.name }}
strategy:
matrix:
pkg:
- name: ${{ inputs.lib-name }}
tarball: "dist/lib/*.tgz"
- name: ${{ inputs.bin-name }}
tarball: "dist/bin/*.tgz"
permissions:
id-token: write
steps:
- uses: xc2/ghwf/pnpm-artifact/restore@main
with:
cache-key: ${{ needs.build.outputs.cache-key }}
cache-path: ${{ needs.build.outputs.cache-path }}
- uses: 109cafe/action-npr@version-fix
with:
version: ${{ inputs.version }}
name: ${{ matrix.pkg.name }}
tarball: ${{ matrix.pkg.tarball }}
token: ${{ secrets.NPM_TOKEN }}
provenance: true