Skip to content

Publish: Packages

Publish: Packages #1

name: "Publish: Packages"
on:
workflow_call:
inputs:
dry-run:
description: "Dry Run"
type: boolean
default: false
secrets:
NPM_PUBLISH_TOKEN:
description: "NPM Publishing Token"
required: true
workflow_dispatch:
inputs:
dry-run:
description: "Dry Run"
type: boolean
default: false
permissions:
contents: read
jobs:
pack-npm:
name: "Package: JavaScript Releases"
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- name: "Setup: Harden Runner"
uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0
with:
egress-policy: audit
- name: "Setup: Checkout"
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
with:
persist-credentials: false
submodules: true
- name: "Setup: Node"
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: ${{ vars.NODE_VERSION || '21' }}
registry-url: 'https://registry.npmjs.org'
- name: "Setup: PNPM"
uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d # v3.0.0
with:
version: ${{ vars.PNPM_VERSION || '8' }}
run_install: |
- recursive: true
args: [--frozen-lockfile, --strict-peer-dependencies]
- name: "Build: Packages"
run: pnpm run -r pack
- name: "Artifact: Packages"
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
with:
name: javamodules-pkg-release-${{ github.sha }}
retention-days: 30
compression-level: 1
overwrite: true
path: |
packages/*/*.tgz