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
40 changes: 0 additions & 40 deletions .github/workflows/prerelease-canary.yml

This file was deleted.

31 changes: 0 additions & 31 deletions .github/workflows/prerelease-pr-cleanup.yml

This file was deleted.

39 changes: 0 additions & 39 deletions .github/workflows/prerelease-pr.yml

This file was deleted.

114 changes: 114 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
name: publish

on:
push:
branches: [master]
pull_request:
types: [opened, synchronize, reopened, closed]

jobs:
release:
if: github.event_name == 'push' && github.repository_owner == 'prismicio'
runs-on: ubuntu-latest
permissions:
contents: write
issues: write
pull-requests: write
id-token: write
env:
MODE: production
outputs:
release_created: ${{ steps.release.outputs.release_created }}
steps:
- uses: googleapis/release-please-action@v4
id: release
continue-on-error: true
with:
release-type: node
- uses: actions/checkout@v6
if: steps.release.outputs.release_created == 'true'
- uses: actions/setup-node@v6
if: steps.release.outputs.release_created == 'true'
with:
node-version: 24
registry-url: "https://registry.npmjs.org"
- if: steps.release.outputs.release_created == 'true'
run: npm ci
- name: "Publish release"
if: steps.release.outputs.release_created == 'true'
run: npm publish
Comment thread
lihbr marked this conversation as resolved.

prerelease:
if: "!cancelled() && github.repository_owner == 'prismicio'"
needs: [release]
Comment thread
lihbr marked this conversation as resolved.
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
env:
MODE: production
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: 24
registry-url: "https://registry.npmjs.org"

# Canary
- name: "Deprecate previous canary"
if: github.event_name == 'push' && needs.release.outputs.release_created != 'true'
continue-on-error: true
run: |
PACKAGE_NAME=$(jq -r ".name" package.json)
PREVIOUS_VERSION=$(npm view "$PACKAGE_NAME" dist-tags.canary 2>/dev/null || true)
if [ -n "$PREVIOUS_VERSION" ]; then
npm deprecate "$PACKAGE_NAME@$PREVIOUS_VERSION" "Replaced by newer canary version"
fi
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: "Publish canary"
if: github.event_name == 'push' && needs.release.outputs.release_created != 'true'
run: |
SHORT_SHA=$(git rev-parse --short HEAD)
CURRENT_VERSION=$(jq -r '.version' package.json)
npm ci
npm version "${CURRENT_VERSION}-canary.${SHORT_SHA}" --no-git-tag-version
npm publish --tag canary

# Pull request
- name: "Deprecate previous PR prerelease"
if: github.event_name == 'pull_request' && github.event.action != 'closed'
continue-on-error: true
run: |
PACKAGE_NAME=$(jq -r ".name" package.json)
TAG="pr-${{ github.event.number }}"
PREVIOUS_VERSION=$(npm view "$PACKAGE_NAME" dist-tags."$TAG" 2>/dev/null || true)
if [ -n "$PREVIOUS_VERSION" ]; then
npm deprecate "$PACKAGE_NAME@$PREVIOUS_VERSION" "Replaced by newer prerelease version"
fi
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: "Publish PR prerelease"
if: github.event_name == 'pull_request' && github.event.action != 'closed'
run: |
SHORT_SHA=$(git rev-parse --short HEAD)
CURRENT_VERSION=$(jq -r '.version' package.json)
npm ci
npm version "${CURRENT_VERSION}-pr.${{ github.event.number }}.${SHORT_SHA}" --no-git-tag-version
npm publish --tag pr-${{ github.event.number }}

- name: "Clean up PR prerelease"
if: github.event_name == 'pull_request' && github.event.action == 'closed'
continue-on-error: true
run: |
PACKAGE_NAME=$(jq -r ".name" package.json)
TAG="pr-${{ github.event.number }}"
VERSION=$(npm view "$PACKAGE_NAME" dist-tags."$TAG" 2>/dev/null || echo "")
if [ -n "$VERSION" ]; then
npm deprecate "$PACKAGE_NAME@$VERSION" "PR ${{ github.event.number }} was closed"
npm dist-tag rm "$PACKAGE_NAME" "$TAG"
fi
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
34 changes: 0 additions & 34 deletions .github/workflows/release.yml

This file was deleted.

2 changes: 2 additions & 0 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ jobs:

build:
runs-on: ubuntu-latest
env:
MODE: production
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
Expand Down
5 changes: 3 additions & 2 deletions .oxfmtrc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"$schema": "./node_modules/oxfmt/configuration_schema.json",
"sortImports": {},
"jsdoc": {}
"semi": false,
"sortImports": true,
"jsdoc": true
}
2 changes: 2 additions & 0 deletions .oxlintrc.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
{
"$schema": "./node_modules/oxlint/configuration_schema.json",
"plugins": ["unicorn", "typescript", "oxc", "jsdoc", "react"],
"rules": {
"no-console": ["warn", { "allow": ["info", "warn", "error"] }],
"no-debugger": "warn",
"prefer-const": "error",
"no-unused-vars": [
"error",
{
Expand Down
24 changes: 0 additions & 24 deletions .versionrc

This file was deleted.

3 changes: 1 addition & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@ All notable changes to this project will be documented in this file. See [standa

## [3.4.1](https://github.com/prismicio/prismic-react/compare/v3.4.0...v3.4.1) (2026-04-03)


### Chore

* upgrade dependencies ([#257](https://github.com/prismicio/prismic-react/issues/257)) ([32a2a11](https://github.com/prismicio/prismic-react/commit/32a2a11))
- upgrade dependencies ([#257](https://github.com/prismicio/prismic-react/issues/257)) ([32a2a11](https://github.com/prismicio/prismic-react/commit/32a2a11))

## [3.4.0](https://github.com/prismicio/prismic-react/compare/v3.3.0...v3.4.0) (2026-02-21)

Expand Down
Loading
Loading