Skip to content

Commit c51c6df

Browse files
authored
Merge branch 'develop' into feature/update-style-linting-to-match-new-css-guidance
2 parents 3814c02 + f8b79e9 commit c51c6df

12 files changed

Lines changed: 106 additions & 94 deletions

File tree

.changeset/brave-actors-buy.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/quick-falcons-return.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"10up-toolkit": patch
3+
---
4+
5+
Fix: Update "Dependency Extraction Webpack Plugin" Dependency

.github/workflows/npm-release-latest-version.yml

Lines changed: 0 additions & 38 deletions
This file was deleted.

.github/workflows/npm-release-next-version.yml

Lines changed: 0 additions & 39 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- trunk
7+
- develop
8+
9+
concurrency: ${{ github.workflow }}-${{ github.ref }}
10+
11+
permissions:
12+
id-token: write # Required for OIDC token generation
13+
contents: write # Required for changesets to push commits/tags
14+
pull-requests: write # Required for changesets to create release PRs
15+
16+
jobs:
17+
release:
18+
name: Release
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Checkout Repo
22+
uses: actions/checkout@v4
23+
24+
- name: Setup Node.js 20.x
25+
uses: actions/setup-node@v4
26+
with:
27+
node-version: 20.x
28+
registry-url: 'https://registry.npmjs.org'
29+
30+
- name: Install Dependencies
31+
run: npm ci
32+
33+
- name: Promote from @next
34+
if: github.ref_name == 'trunk'
35+
run: |
36+
[[ -f .changeset/pre.json ]] && { git config user.email "github-actions[bot]@users.noreply.github.com"; git config user.name "github-actions[bot]"; npx changeset pre exit; npx changeset version; git add -u; git commit -m "chore: promote from @next" --no-verify; git push --follow-tags; } || echo 'not in pre mode, no need to exit'
37+
38+
- name: Enter pre next
39+
if: github.ref_name == 'develop'
40+
run: |
41+
[[ ! -f .changeset/pre.json ]] && npx changeset pre enter next || echo 'already in pre mode'
42+
43+
- name: Create Release Pull Request or Publish to npm
44+
id: changesets
45+
uses: changesets/action@v1
46+
with:
47+
publish: npx changeset publish
48+
commit: |
49+
${{ github.ref_name == 'develop' && 'chore: version packages (next)' || 'chore: version packages' }}
50+
createGithubReleases: true
51+
env:
52+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
53+
54+
merge-to-develop:
55+
name: Merge trunk to develop
56+
runs-on: ubuntu-latest
57+
needs: release
58+
if: github.ref_name == 'trunk'
59+
steps:
60+
- name: Checkout Repo
61+
uses: actions/checkout@v4
62+
with:
63+
fetch-depth: 0
64+
ref: develop
65+
66+
- name: Configure Git
67+
run: |
68+
git config user.email "github-actions[bot]@users.noreply.github.com"
69+
git config user.name "github-actions[bot]"
70+
71+
- name: Merge trunk into develop
72+
run: |
73+
git fetch origin trunk
74+
git merge origin/trunk --no-edit -m "chore: merge trunk into develop"
75+
git push origin develop

CONTRIBUTING.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,12 @@ To include a changeset follow these steps:
6767

6868
A github bot will check if you PR include a changeset file. If it doesn't you will be warned in the PR.
6969

70+
### Publishing to npm
71+
72+
This repository uses [npm trusted publishing with OIDC](https://docs.npmjs.com/trusted-publishers/) for secure, automated releases. The release workflow authenticates directly with npm using short-lived tokens, eliminating the need for long-lived npm tokens.
73+
74+
All releases are handled by the unified `release.yml` workflow, which automatically publishes packages with cryptographic provenance attestations.
75+
7076
### @next releases
7177

7278
Whenever a PR is merged to the `develop` branch, if it contains a changeset a new PR will be opened automatically against `develop` to bump versions and push to `npm` under the `next` tag. Merging this PR opened by `changeset` will trigger the release flow.
@@ -78,7 +84,7 @@ Here's a summary of the process
7884
2. Wait for `changeset` to open a new PR called `Release (next)`.
7985
3. Optionally merge more PRs into `develop` if you want to include other changes in the same release. Doing so will update the `Release (next)` PR automatically.
8086
4. Merge the PR opened by `changeset` into `develop`.
81-
5. A new release under the `next` tag will be pushed to npm.
87+
5. A new release under the `next` tag will be pushed to npm via OIDC authentication.
8288
6. A new GitHub Release with the changelog will be created automatically.
8389

8490
### Stable releases
@@ -94,6 +100,6 @@ Here's a summary of the process
94100
2. Merge `develop` into `trunk`.
95101
2. Wait for `changeset` to open a new PR called `Release`.
96102
4. Merge the PR opened by `changeset` into `trunk`.
97-
5. A new release under the `latest` tag will be pushed to npm.
103+
5. A new release under the `latest` tag will be pushed to npm via OIDC authentication.
98104
6. Merge `trunk` back into `develop`.
99105
7. A new GitHub Release with the changelog will be created automatically.

package-lock.json

Lines changed: 7 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/toolkit/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## 6.5.1
4+
5+
### Patch Changes
6+
7+
- 6a4b3d2: Update webpack-dev-server to 5.2.2 and react-refresh-webpack-plugin to 0.5.17
8+
39
## 6.5.0
410

511
### Minor Changes

packages/toolkit/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"url": "git+https://github.com/10up/10up-toolkit.git",
1414
"directory": "packages/toolkit"
1515
},
16-
"version": "6.5.0",
16+
"version": "6.5.1",
1717
"bin": {
1818
"10up-toolkit": "bin/10up-toolkit.js"
1919
},
@@ -25,7 +25,7 @@
2525
"@typescript-eslint/eslint-plugin": "^6.17.0",
2626
"@typescript-eslint/parser": "^6.17.0",
2727
"@vanilla-extract/webpack-plugin": "^2.3.13",
28-
"@wordpress/dependency-extraction-webpack-plugin": "^5.4.0",
28+
"@wordpress/dependency-extraction-webpack-plugin": "^6.36.0",
2929
"@wordpress/eslint-plugin": "^17.5.0",
3030
"@wordpress/jest-console": "^7.19.0",
3131
"babel-jest": "^29.7.0",

projects/10up-theme/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"@linaria/babel-preset": "^5.0.3",
2121
"@linaria/webpack-loader": "^5.0.3",
2222
"@wordpress/env": "^10.10.0",
23-
"10up-toolkit": "^6.5.0"
23+
"10up-toolkit": "^6.5.1"
2424
},
2525
"dependencies": {
2626
"@10up/block-components": "^1.18.0",

0 commit comments

Comments
 (0)