Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
90 changes: 0 additions & 90 deletions .github/workflows/publish.yml

This file was deleted.

47 changes: 47 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Publish Release

on:
# The build will be triggered when we publish a release
release:
types: [published]

permissions:
id-token: write
contents: read

jobs:
release:
runs-on: ubuntu-latest

steps:

- uses: actions/checkout@v4

- name: Install Node.js 💻
uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://registry.npmjs.org/

- name: Install locked dependencies 🔧
run: npm ci

- name: Version ✅
run: npm version --no-git-tag-version ${{ github.event.release.tag_name }}

- name: Test 🧪
env:
TZ: America/New_York
run: npm test

- name: Upgrade npm for OIDC support 📦
# Upgrade npm to support OIDC trusted publishing. Earlier steps run with the
# npm version bundled with current Node version to maintain consistency with
# the development environment. Only the Publish step requires the newer version.
# See https://docs.npmjs.com/trusted-publishers
# > Note: Trusted publishing requires npm CLI version 11.5.1 or later.
# TODO: This can be removed once we upgrade to Node 24 or greater.
run: npm install -g npm@^11.5.1

- name: Publish 📚
run: npm publish --access public
63 changes: 63 additions & 0 deletions .github/workflows/test-and-tag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Test & Publish Next

on:
# The build will be triggered on push to main
push:
branches:
- main

permissions:
id-token: write
contents: read

concurrency:
group: test-build-${{ github.ref_name }}-${{ github.event_name }}
cancel-in-progress: true

jobs:
test-and-tag:
runs-on: ubuntu-latest

steps:

- uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 0

- name: Install Node.js 💻
uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://registry.npmjs.org/

- name: Set up Python 🐍
uses: actions/setup-python@v5
with:
python-version: "3.10"

- name: Set up Dunamai 🪄
run: pip install -r requirements-ci.txt

- name: Install locked dependencies 🔧
run: npm ci

- name: Version ✅
run: npm version --no-git-tag-version $(dunamai from git --style semver)

- name: Test 🧪
env:
TZ: America/New_York
run: npm test

- name: Upgrade npm for OIDC support 📦
# Upgrade npm to support OIDC trusted publishing. Earlier steps run with the
# npm version bundled with current Node version to maintain consistency with
# the development environment. Only the Publish step requires the newer version.
# See https://docs.npmjs.com/trusted-publishers
# > Note: Trusted publishing requires npm CLI version 11.5.1 or later.
# TODO: This can be removed once we upgrade to Node 24 or greater.
run: npm install -g npm@^11.5.1

- name: Publish 📚
run: npm publish --tag next --access public