Skip to content

ci(ci): add node 24 to test matrix (#314) #242

ci(ci): add node 24 to test matrix (#314)

ci(ci): add node 24 to test matrix (#314) #242

Workflow file for this run

name: CD
# **What it does**: Automatically generates releases and release notes.
# **Why we have it**: Allows development to focus on higher value work.
on:
push:
branches:
- main
# Allows this workflow to be run manually from the Actions tab
workflow_dispatch:
permissions:
contents: read
jobs:
release:
name: Create/Update Release Pull Request
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
outputs:
release_created: ${{ steps.release.outputs.release_created }}
steps:
- name: Release Please
id: release
uses: googleapis/release-please-action@a02a34c4d625f9be7cb89156071d8567266a2445 # v4.2.0
with:
config-file: .github/release-please/config.json
manifest-file: .github/release-please/manifest.json
publish-npm:
name: Publish to NPM
needs: release
if: needs.release.outputs.release_created == 'true'
runs-on: ubuntu-latest
environment: main
permissions:
contents: read
id-token: write
steps:
- name: Check out repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- name: Setup Node
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
check-latest: true
node-version: lts/*
registry-url: https://registry.npmjs.org
- name: Publish to NPM
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
# Build docs/definitions, and remove dev values
# from package.json before publishing to reduce package size
run: |
npm i --ignore-scripts
npm run build --if-present
npm pkg delete commitlint devDependencies scripts
npm publish --access public --ignore-scripts --provenance
publish-ghp:
name: Publish to GitHub Packages
needs: release
if: needs.release.outputs.release_created == 'true'
runs-on: ubuntu-latest
environment: main
permissions:
contents: read
id-token: write
packages: write
steps:
- name: Check out repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- name: Setup Node
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
check-latest: true
node-version: lts/*
registry-url: https://npm.pkg.github.com
scope: "@fdawgs"
- name: Scope package
run: |
pkgName=$(node -p "require('./package.json').name")
npm pkg set name="@fdawgs/$pkgName"
- name: Publish to GitHub Packages
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Build docs/definitions, and remove dev values
# from package.json before publishing to reduce package size
run: |
npm i --ignore-scripts
npm run build --if-present
npm pkg delete commitlint devDependencies scripts
npm publish --access public --ignore-scripts --provenance