Skip to content

Commit 45be174

Browse files
authored
Merge branch 'main' into askpt/animated-background
2 parents 2ae2c9a + df6b8f4 commit 45be174

File tree

8 files changed

+232
-25
lines changed

8 files changed

+232
-25
lines changed

.github/workflows/ci.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
merge_group:
8+
9+
concurrency:
10+
group: ci-${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
12+
13+
permissions:
14+
contents: read
15+
16+
jobs:
17+
build:
18+
name: Build
19+
runs-on: ubuntu-latest
20+
21+
steps:
22+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
23+
24+
- uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
25+
with:
26+
node-version: lts/*
27+
cache: npm
28+
29+
- name: Install dependencies
30+
run: npm ci
31+
32+
- name: Build
33+
run: npm run build

.github/workflows/deploy.yml

Lines changed: 71 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,102 @@
1-
name: Deploy pages
1+
name: Run Release Please
22

33
on:
4-
workflow_dispatch:
54
push:
6-
branches: [main]
7-
8-
permissions:
9-
contents: read
10-
pages: write
11-
id-token: write
5+
branches:
6+
- main
127

138
concurrency:
14-
group: pages
9+
group: deploy-${{ github.ref }}
1510
cancel-in-progress: false
1611

12+
permissions:
13+
contents: read
14+
1715
jobs:
18-
build:
16+
release-please:
17+
permissions:
18+
id-token: write # for googleapis/release-please-action to create release tag
19+
contents: write # for googleapis/release-please-action to create release commit
20+
pull-requests: write # for googleapis/release-please-action to create release PR
21+
runs-on: ubuntu-latest
22+
23+
steps:
24+
- uses: googleapis/release-please-action@16a9c90856f42705d54a6fda1823352bdc62cf38 # v4
25+
id: release
26+
with:
27+
token: ${{ secrets.RELEASE_PLEASE_ACTION_TOKEN }}
28+
29+
outputs:
30+
release_created: ${{ steps.release.outputs.release_created }}
31+
32+
publish-npm:
1933
runs-on: ubuntu-latest
34+
needs: release-please
35+
permissions:
36+
id-token: write # npm provenance
37+
contents: read
38+
if: ${{ fromJSON(needs.release-please.outputs.release_created || false) }}
2039

2140
steps:
22-
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 #v6.0.1
41+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
2342

24-
- uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 #v6.2.0
43+
- uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
2544
with:
26-
node-version: "lts/*"
45+
node-version-file: ".nvmrc"
46+
registry-url: https://registry.npmjs.org
2747

28-
- name: Setup @antfu/ni
29-
run: npm i -g @antfu/ni
48+
- name: Install dependencies
49+
run: npm ci
50+
51+
- name: Publish package
52+
run: npm publish --provenance --access public
53+
54+
build-pages:
55+
runs-on: ubuntu-latest
56+
needs: release-please
57+
permissions:
58+
contents: read
59+
pages: write
60+
id-token: write
61+
if: ${{ fromJSON(needs.release-please.outputs.release_created || false) }}
62+
63+
steps:
64+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
65+
66+
- uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
67+
with:
68+
node-version: lts/*
3069

3170
- name: Install dependencies
32-
run: nci
71+
run: npm ci
3372

3473
- name: Build
35-
run: nr build --base /${{github.event.repository.name}}/ --without-notes
74+
run: npm run build -- --base /${{ github.event.repository.name }}/ --without-notes
3675
env:
37-
NODE_OPTIONS: "--max-old-space-size=4096"
76+
NODE_OPTIONS: --max-old-space-size=4096
3877

3978
- name: Setup Pages
40-
uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b #v5.0.0
79+
uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5.0.0
4180

42-
- uses: actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b #v4.0.0
81+
- uses: actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b # v4.0.0
4382
with:
4483
path: dist
4584

46-
deploy:
85+
deploy-pages:
86+
name: Deploy Pages
87+
runs-on: ubuntu-latest
88+
needs:
89+
- release-please
90+
- build-pages
91+
permissions:
92+
pages: write
93+
id-token: write
94+
if: ${{ fromJSON(needs.release-please.outputs.release_created || false) }}
4795
environment:
4896
name: github-pages
4997
url: ${{ steps.deployment.outputs.page_url }}
50-
needs: build
51-
runs-on: ubuntu-latest
52-
name: Deploy
98+
5399
steps:
54100
- name: Deploy to GitHub Pages
55101
id: deployment
56-
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e #v4.0.5
102+
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5

.github/workflows/lint-pr.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Lint PR
2+
3+
on:
4+
pull_request_target:
5+
types:
6+
- opened
7+
- edited
8+
- synchronize
9+
10+
jobs:
11+
main:
12+
name: Validate PR title
13+
runs-on: ubuntu-latest
14+
permissions:
15+
pull-requests: write
16+
steps:
17+
- uses: amannn/action-semantic-pull-request@48f256284bd46cdaab1048c3721360e808335d50 # v6
18+
id: lint_pr_title
19+
env:
20+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
21+
22+
- uses: marocchino/sticky-pull-request-comment@70d2764d1a7d5d9560b100cbea0077fc8f633987 # v3
23+
if: always() && (steps.lint_pr_title.outputs.error_message != null)
24+
with:
25+
header: pr-title-lint-error
26+
message: |
27+
Hey there and thank you for opening this pull request.
28+
29+
We require pull request titles to follow the Conventional Commits specification and it looks like your proposed title needs to be adjusted.
30+
Details:
31+
32+
```
33+
${{ steps.lint_pr_title.outputs.error_message }}
34+
```
35+
36+
- if: ${{ steps.lint_pr_title.outputs.error_message == null }}
37+
uses: marocchino/sticky-pull-request-comment@70d2764d1a7d5d9560b100cbea0077fc8f633987 # v3
38+
with:
39+
header: pr-title-lint-error
40+
delete: true

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
22

.release-please-manifest.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
".": "0.0.0"
3+
}

netlify.toml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[build]
2+
publish = 'dist'
3+
command = 'npm run build'
4+
5+
[build.environment]
6+
NODE_VERSION = '20'
7+
8+
[[redirects]]
9+
from = '/*'
10+
to = '/index.html'
11+
status = 200

release-please-config.json

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
{
2+
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
3+
"signoff": "OpenFeature Bot <109696520+openfeaturebot@users.noreply.github.com>",
4+
"packages": {
5+
".": {
6+
"release-type": "node",
7+
"include-component-in-tag": false,
8+
"versioning": "default"
9+
}
10+
},
11+
"changelog-sections": [
12+
{
13+
"type": "feat",
14+
"section": "✨ New Features"
15+
},
16+
{
17+
"type": "fix",
18+
"section": "🐛 Bug Fixes"
19+
},
20+
{
21+
"type": "chore",
22+
"section": "🧹 Chore"
23+
},
24+
{
25+
"type": "docs",
26+
"section": "📚 Documentation"
27+
},
28+
{
29+
"type": "perf",
30+
"section": "🚀 Performance"
31+
},
32+
{
33+
"type": "build",
34+
"hidden": true,
35+
"section": "🛠️ Build"
36+
},
37+
{
38+
"type": "deps",
39+
"section": "📦 Dependencies"
40+
},
41+
{
42+
"type": "ci",
43+
"hidden": true,
44+
"section": "🚦 CI"
45+
},
46+
{
47+
"type": "refactor",
48+
"section": "🔄 Refactoring"
49+
},
50+
{
51+
"type": "revert",
52+
"section": "🔙 Reverts"
53+
},
54+
{
55+
"type": "style",
56+
"hidden": true,
57+
"section": "🎨 Styling"
58+
},
59+
{
60+
"type": "test",
61+
"hidden": true,
62+
"section": "🧪 Tests"
63+
}
64+
]
65+
}

renovate.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
3+
"extends": [
4+
"github>open-feature/community-tooling"
5+
],
6+
"dependencyDashboardApproval": true,
7+
"recreateWhen": "never"
8+
}

0 commit comments

Comments
 (0)