Skip to content

Commit 8177975

Browse files
Merge pull request #1 from gennit-project/chore/remove-vestigial-monorepo-artifacts
Fix plugin registry publishing after monorepo migration
2 parents 7dea6df + 02f2f3e commit 8177975

3 files changed

Lines changed: 66 additions & 119 deletions

File tree

.github/workflows/publish-plugins.yaml

Lines changed: 0 additions & 107 deletions
This file was deleted.
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: Publish Registry
2+
3+
# Regenerates registry.json from registry-sources.json (reading each standalone
4+
# plugin repo's GitHub Releases) and uploads it to the GCS object that
5+
# production reads: gs://mf-plugins-prod/registry.json
6+
#
7+
# Triggers:
8+
# - workflow_dispatch: publish on demand (e.g. right after a plugin cuts a
9+
# new release in its own repo).
10+
# - push to main touching the sources/generator: republish when the plugin
11+
# list changes.
12+
# - schedule: a daily safety net so new plugin versions get picked up even if
13+
# no one triggers a manual run.
14+
15+
on:
16+
workflow_dispatch:
17+
push:
18+
branches: [main]
19+
paths:
20+
- registry-sources.json
21+
- scripts/generate-registry.mjs
22+
- .github/workflows/publish-registry.yml
23+
schedule:
24+
- cron: "0 6 * * *"
25+
26+
permissions:
27+
id-token: write
28+
contents: read
29+
30+
concurrency:
31+
group: publish-registry
32+
cancel-in-progress: true
33+
34+
jobs:
35+
publish:
36+
runs-on: ubuntu-latest
37+
env:
38+
GCS_BUCKET: mf-plugins-prod
39+
REGISTRY_OBJECT: registry.json
40+
steps:
41+
- uses: actions/checkout@v4
42+
43+
- uses: actions/setup-node@v4
44+
with:
45+
node-version: 20
46+
47+
# generate-registry.mjs reads registry-sources.json and calls the GitHub
48+
# Releases API for each plugin repo. GITHUB_TOKEN raises the API rate
49+
# limit and covers public reads.
50+
- name: Generate registry.json
51+
env:
52+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
53+
run: npm run registry:generate
54+
55+
- name: Authenticate to GCP
56+
uses: google-github-actions/auth@v2
57+
with:
58+
workload_identity_provider: ${{ secrets.WIF_PROVIDER }}
59+
service_account: ${{ secrets.GCP_SA_EMAIL }}
60+
61+
- uses: google-github-actions/setup-gcloud@v2
62+
63+
- name: Upload registry.json to GCS
64+
run: gcloud storage cp registry.json "gs://${GCS_BUCKET}/${REGISTRY_OBJECT}"

.gitignore

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,6 @@ npm-debug.log*
44
yarn-debug.log*
55
yarn-error.log*
66

7-
# Build outputs
8-
dist/
9-
out/
10-
117
# Environment variables
128
.env
139
.env.local
@@ -37,11 +33,5 @@ logs/
3733
coverage/
3834
.nyc_output/
3935

40-
# Plugin-specific build artifacts
41-
plugins/*/dist/
42-
plugins/*/node_modules/
43-
44-
# CI/CD artifacts
45-
registry.json
46-
*.tgz
47-
*.sha256
36+
# Generated registry (produced by `npm run registry:generate`)
37+
registry.json

0 commit comments

Comments
 (0)