Skip to content

v0.2.0

v0.2.0 #5

Workflow file for this run

# SPDX-FileCopyrightText: 2026 LibreCode coop and contributors
# SPDX-License-Identifier: AGPL-3.0-or-later
name: Publish to npm
on:
release:
types: [published]
permissions:
contents: read
packages: write
id-token: write
jobs:
publish:
runs-on: ubuntu-latest
name: Build and publish to npm
steps:
- name: Check actor permission level
uses: skjnldsv/check-actor-permission@e591dbfe838300c007028e1219ca82cc26e8d7c5 # v2.1
with:
require: admin
- name: Checkout
uses: actions/checkout@v4
- name: Read package.json node and npm engines version
uses: skjnldsv/read-package-engines-version-actions@8205673bab74a63eb9b8093402fd9e0e018663a1 # v2.2
id: versions
with:
fallbackNode: '^20'
fallbackNpm: '^10'
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
uses: actions/setup-node@v4
with:
node-version: ${{ steps.versions.outputs.nodeVersion }}
registry-url: 'https://registry.npmjs.org'
- name: Set up npm ${{ steps.versions.outputs.npmVersion }}
run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}"
- name: Install dependencies & build
env:
CYPRESS_INSTALL_BINARY: 0
run: |
npm i
npm run build:lib
- name: Publish to npm
run: npm publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Setup Github Package Registry
uses: actions/setup-node@v4
with:
registry-url: 'https://npm.pkg.github.com'
- name: Publish to GitHub Packages
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}