Skip to content

Publish Package

Publish Package #23

Workflow file for this run

name: Publish Package
on:
workflow_dispatch:
permissions: {}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
publish:
name: Publish Package
runs-on: ubuntu-latest
environment: publish
permissions:
id-token: write # Required for OIDC
contents: write # Required for git operations
steps:
- name: Generate App token
id: app-token
uses: actions/create-github-app-token@1b10c78c7865c340bc4f6099eb2f838309f1e8c3 # v3.1.1
with:
client-id: ${{ secrets.CLIENT_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
persist-credentials: true
token: ${{ steps.app-token.outputs.token }}
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version-file: 'package.json'
package-manager-cache: false
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies
run: npm ci
- name: Set up git user
run: |
git config user.name "stencil-community-releaser[bot]"
git config user.email "stencil-community-releaser[bot]@users.noreply.github.com"
- name: Publish to npm
run: npm run release -- --ci --verbose
env:
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
NPM_CONFIG_PROVENANCE: true