Skip to content

Commit 3648d8e

Browse files
authored
Merge branch 'main' into dependabot/npm_and_yarn/axios-1.12.0
2 parents ab9cc4e + a38892c commit 3648d8e

File tree

10 files changed

+1293
-2962
lines changed

10 files changed

+1293
-2962
lines changed

.devcontainer/devcontainer.json

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"name": "Doctocat Dev Container",
3+
"image": "mcr.microsoft.com/devcontainers/javascript-node:24",
4+
5+
// Configure tool-specific properties.
6+
"customizations": {
7+
"vscode": {
8+
"extensions": [
9+
"dbaeumer.vscode-eslint",
10+
"esbenp.prettier-vscode",
11+
"GitHub.copilot",
12+
"GitHub.copilot-chat"
13+
]
14+
}
15+
},
16+
17+
// Features to add to the dev container. More info: https://containers.dev/features.
18+
"features": {
19+
"ghcr.io/devcontainers/features/git:1": {},
20+
"ghcr.io/devcontainers/features/github-cli:1": {}
21+
},
22+
23+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
24+
"forwardPorts": [8000, 9000],
25+
26+
// Use 'postCreateCommand' to run commands after the container is created.
27+
"postCreateCommand": "npm install",
28+
29+
// Configure the container to run as a non-root user with the same UID/GID as your local user.
30+
"remoteUser": "node"
31+
}

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
uses: actions/checkout@v4
1010

1111
- name: Set up Node.js
12-
uses: actions/setup-node@v4
12+
uses: actions/setup-node@v6
1313
with:
1414
node-version: 18
1515
cache: 'npm'

.github/workflows/deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ permissions:
1313
jobs:
1414
build_deploy:
1515
name: Build and deploy
16-
uses: primer/.github/.github/workflows/deploy.yml@v2.2.0
16+
uses: primer/.github/.github/workflows/deploy.yml@v2.2.1
1717
secrets:
1818
gh_token: ${{ secrets.GITHUB_TOKEN }}
1919
with:

.github/workflows/deploy_preview.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ permissions:
1111
jobs:
1212
deploy:
1313
name: Build and deploy
14-
uses: primer/.github/.github/workflows/deploy_preview.yml@v2.2.0
14+
uses: primer/.github/.github/workflows/deploy_preview.yml@v2.2.1
1515
secrets:
1616
gh_token: ${{ secrets.GITHUB_TOKEN }}
1717
with:

.github/workflows/release.yml

Lines changed: 63 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,21 @@
11
name: Release
22
on:
33
push:
4-
branches:
5-
- 'main'
6-
- 'next_major'
4+
5+
concurrency:
6+
group: ${{ github.workflow }}-${{ github.ref }}
7+
cancel-in-progress: true
8+
9+
permissions:
10+
id-token: write # Required for OIDC
11+
contents: read
12+
checks: write
13+
statuses: write
14+
715
jobs:
8-
release:
9-
name: Final
10-
if: ${{ github.repository == 'primer/doctocat' }}
16+
release-main:
17+
name: Main
18+
if: ${{ github.repository == 'primer/doctocat' && github.ref_name == 'main' }}
1119

1220
runs-on: ubuntu-latest
1321
steps:
@@ -19,21 +27,66 @@ jobs:
1927
persist-credentials: false
2028

2129
- name: Set up Node.js
22-
uses: actions/setup-node@v4
30+
uses: actions/setup-node@v6
2331
with:
24-
node-version: 18
32+
node-version: 24
2533
cache: 'npm'
2634

2735
- name: Install dependencies
2836
run: npm ci
2937

3038
- name: Create release pull request or publish to npm
3139
id: changesets
32-
uses: changesets/action@master
40+
uses: changesets/action@v1
3341
with:
3442
title: Release Tracking
3543
# This expects you to have a script called release which does a build for your packages and calls changeset publish
3644
publish: npm run release
3745
env:
3846
GITHUB_TOKEN: ${{ secrets.GPR_AUTH_TOKEN_SHARED }}
39-
NPM_TOKEN: ${{ secrets.NPM_AUTH_TOKEN_SHARED }}
47+
48+
release-canary:
49+
name: Canary
50+
if: ${{ github.repository == 'primer/doctocat' && github.ref_name != 'main' && github.ref_name != 'changeset-release/main' }}
51+
52+
runs-on: ubuntu-latest
53+
steps:
54+
- name: Checkout repository
55+
uses: actions/checkout@v4
56+
with:
57+
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
58+
fetch-depth: 0
59+
60+
- name: Set up Node.js
61+
uses: actions/setup-node@v6
62+
with:
63+
node-version: 24
64+
cache: 'npm'
65+
66+
- name: Install dependencies
67+
run: npm ci
68+
69+
- name: Publish canary version
70+
run: |
71+
echo "$( jq '.version = "0.0.0"' package.json )" > package.json
72+
echo -e "---\n'@primer/gatsby-theme-doctocat': patch\n---\n\nFake entry to force publishing" > .changeset/force-snapshot-release.md
73+
rm -f .changeset/pre.json
74+
npx changeset version --snapshot
75+
npx changeset publish --tag canary
76+
env:
77+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
78+
79+
- name: Output canary version number
80+
uses: actions/github-script@v8
81+
with:
82+
script: |
83+
const package = require(`${process.env.GITHUB_WORKSPACE}/theme/package.json`)
84+
github.rest.repos.createCommitStatus({
85+
owner: context.repo.owner,
86+
repo: context.repo.repo,
87+
sha: context.sha,
88+
state: 'success',
89+
context: `Published ${package.name}`,
90+
description: package.version,
91+
target_url: `https://unpkg.com/${package.name}@${package.version}/`
92+
})

.github/workflows/release_canary.yml

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

.github/workflows/stale.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
stale:
88
runs-on: ubuntu-latest
99
steps:
10-
- uses: actions/stale@v4
10+
- uses: actions/stale@v10
1111
with:
1212
# General settings
1313
days-before-stale: 60

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v18
1+
v24

0 commit comments

Comments
 (0)