Skip to content

Commit 2b0a5a6

Browse files
committed
fix(release): debug 3
1 parent 35a9cd9 commit 2b0a5a6

File tree

1 file changed

+9
-231
lines changed

1 file changed

+9
-231
lines changed

.github/workflows/publish.yml

Lines changed: 9 additions & 231 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,18 @@ jobs:
2424
id-token: write
2525

2626
steps:
27+
- name: Generate GitHub App token (with org members:read)
28+
id: app-token
29+
uses: actions/create-github-app-token@v2
30+
with:
31+
app-id: ${{ secrets.APP_ID }}
32+
private-key: ${{ secrets.PRIVATE_KEY }}
33+
2734
- name: Check if actor is member of admin or client-libs team
2835
id: team-check
2936
uses: actions/github-script@v7
3037
with:
31-
github-token: ${{ secrets.GITHUB_TOKEN }}
38+
github-token: ${{ steps.app-token.outputs.token }}
3239
script: |
3340
const org = 'supabase'
3441
const { actor } = context
@@ -62,235 +69,6 @@ jobs:
6269
echo "You must be a member of @supabase/admin or @supabase/client-libs."
6370
exit 1
6471
65-
# - name: Generate token
66-
# id: app-token
67-
# uses: actions/create-github-app-token@v2
68-
# with:
69-
# app-id: ${{ secrets.APP_ID }}
70-
# private-key: ${{ secrets.PRIVATE_KEY }}
7172
# - uses: actions/checkout@v5
7273
# with:
73-
# fetch-depth: 0
74-
75-
# - uses: actions/setup-node@v4
76-
# with:
77-
# node-version: ${{ env.NODE_VERSION }}
78-
# cache: 'npm'
79-
# registry-url: 'https://registry.npmjs.org'
80-
81-
# # Ensure npm 11.5.1 or later is installed for trusted publishing support
82-
# - name: Update npm
83-
# run: npm install -g npm@latest
84-
# - name: Install dependencies
85-
# run: npm ci --legacy-peer-deps
86-
# - name: Configure git
87-
# run: |
88-
# git config --global user.name "supabase-releaser[bot]"
89-
# git config --global user.email "supabase-releaser[bot]@users.noreply.github.com"
90-
91-
# - name: Validate input
92-
# run: |
93-
# VS="${{ github.event.inputs.version_specifier }}"
94-
# echo "Validating: $VS"
95-
96-
# if [[ "$VS" =~ ^(patch|minor|major|prepatch|preminor|premajor|prerelease)$ ]]; then
97-
# echo "✔ bump keyword"
98-
# elif [[ "$VS" =~ ^v?[0-9]+\.[0-9]+\.[0-9]+([.-][0-9A-Za-z.-]+)?$ ]]; then
99-
# echo "✔ explicit version"
100-
# else
101-
# echo "❌ Invalid version_specifier: '$VS'"
102-
# echo " Use: patch|minor|major|pre*, or v1.2.3"
103-
# exit 1
104-
# fi
105-
106-
# - name: Release
107-
# env:
108-
# NPM_CONFIG_PROVENANCE: true
109-
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
110-
# RELEASE_GITHUB_TOKEN: ${{ steps.app-token.outputs.token }} # used for tags
111-
# run: |
112-
# npm run release-stable -- --versionSpecifier "${{ github.event.inputs.version_specifier }}"
113-
114-
# - name: Summary
115-
# if: ${{ success() }}
116-
# run: |
117-
# echo "## ✅ Stable Release" >> $GITHUB_STEP_SUMMARY
118-
# echo "- **Version specifier:** \`${{ github.event.inputs.version_specifier }}\`" >> $GITHUB_STEP_SUMMARY
119-
# echo "- **Source commit:** HEAD of the checked-out branch" >> $GITHUB_STEP_SUMMARY
120-
# echo "- **Dist-tag:** \`latest\`" >> $GITHUB_STEP_SUMMARY
121-
122-
# docs-after-stable-release:
123-
# name: Generate Documentation
124-
# needs: release-stable
125-
# if: ${{
126-
# github.event_name == 'workflow_dispatch' &&
127-
# needs.release-stable.result == 'success'
128-
# }}
129-
# uses: ./.github/workflows/docs.yml
130-
# permissions:
131-
# actions: read
132-
# contents: write
133-
134-
# trigger-update-js-libs:
135-
# name: Trigger Update JS Libs
136-
# runs-on: ubuntu-latest
137-
# needs: release-stable
138-
# if: ${{
139-
# github.event_name == 'workflow_dispatch' &&
140-
# needs.release-stable.result == 'success'
141-
# }}
142-
# steps:
143-
# - name: Generate token
144-
# id: app-token
145-
# uses: actions/create-github-app-token@v2
146-
# with:
147-
# app-id: ${{ secrets.APP_ID }}
148-
# private-key: ${{ secrets.PRIVATE_KEY }}
149-
# - name: Trigger supabase/supabase update-js-libs workflow
150-
# uses: actions/github-script@v7
151-
# with:
152-
# github-token: ${{ steps.app-token.outputs.token }}
153-
# script: |
154-
# await github.rest.actions.createWorkflowDispatch({
155-
# owner: 'supabase',
156-
# repo: 'supabase',
157-
# workflow_id: 'update-js-libs.yml',
158-
# ref: 'master',
159-
# inputs: {
160-
# version: '${{ github.event.inputs.version_specifier }}',
161-
# source: 'supabase-js-stable-release'
162-
# }
163-
# });
164-
165-
# trigger-supabase-docs-update:
166-
# name: Trigger Supabase Docs Update
167-
# runs-on: ubuntu-latest
168-
# needs: [release-stable, docs-after-stable-release]
169-
# if: ${{
170-
# github.event_name == 'workflow_dispatch' &&
171-
# needs.release-stable.result == 'success' &&
172-
# needs.docs-after-stable-release.result == 'success'
173-
# }}
174-
# steps:
175-
# - name: Generate token
176-
# id: app-token
177-
# uses: actions/create-github-app-token@v2
178-
# with:
179-
# app-id: ${{ secrets.APP_ID }}
180-
# private-key: ${{ secrets.PRIVATE_KEY }}
181-
182-
# - name: Trigger supabase/supabase docs workflow
183-
# uses: actions/github-script@v7
184-
# with:
185-
# github-token: ${{ steps.app-token.outputs.token }}
186-
# script: |
187-
# await github.rest.actions.createWorkflowDispatch({
188-
# owner: 'supabase',
189-
# repo: 'supabase',
190-
# workflow_id: 'docs-js-libs-update.yml',
191-
# ref: 'master',
192-
# inputs: {
193-
# version: '${{ github.event.inputs.version_specifier }}',
194-
# source: 'supabase-js-stable-release'
195-
# }
196-
# });
197-
198-
# # preview jobs
199-
# ci-core:
200-
# if: ${{ github.event_name == 'push' }}
201-
# name: Core Packages CI
202-
# uses: ./.github/workflows/ci-core.yml
203-
# permissions:
204-
# actions: read
205-
# contents: read
206-
207-
# ci-supabase-js:
208-
# if: ${{ github.event_name == 'push' }}
209-
# name: Supabase-JS Integration CI
210-
# uses: ./.github/workflows/ci-supabase-js.yml
211-
# permissions:
212-
# actions: read
213-
# contents: read
214-
215-
# ci-auth-js-node18:
216-
# if: ${{ github.event_name == 'push' }}
217-
# name: Auth-JS Node.js 18 Compatibility
218-
# uses: ./.github/workflows/ci-auth-js-node18.yml
219-
# permissions:
220-
# actions: read
221-
# contents: read
222-
223-
# # ==========================================
224-
# # CANARY RELEASE (only on master, after all CI passes)
225-
# # ==========================================
226-
227-
# release-canary:
228-
# name: Release Canary
229-
# runs-on: ubuntu-latest
230-
# needs: [ci-core, ci-supabase-js, ci-auth-js-node18]
231-
# permissions:
232-
# contents: read
233-
# id-token: write
234-
# # Only run on master branch pushes, and only if all CI jobs succeeded
235-
# if: |
236-
# github.ref == 'refs/heads/master' &&
237-
# github.event_name == 'push' &&
238-
# needs.ci-core.result == 'success' &&
239-
# needs.ci-supabase-js.result == 'success' &&
240-
# needs.ci-auth-js-node18.result == 'success'
241-
# steps:
242-
# - name: Generate token
243-
# id: app-token
244-
# uses: actions/create-github-app-token@v2
245-
# with:
246-
# app-id: ${{ secrets.APP_ID }}
247-
# private-key: ${{ secrets.PRIVATE_KEY }}
248-
249-
# - name: Checkout code
250-
# uses: actions/checkout@v5
251-
# with:
252-
# fetch-depth: 0
253-
254-
# - name: Setup Node.js
255-
# uses: actions/setup-node@v4
256-
# with:
257-
# node-version: ${{ env.NODE_VERSION }}
258-
# cache: 'npm'
259-
# registry-url: 'https://registry.npmjs.org'
260-
261-
# # Ensure npm 11.5.1 or later is installed for trusted publishing support
262-
# - name: Update npm
263-
# run: npm install -g npm@latest
264-
# - name: Install dependencies
265-
# run: npm ci --legacy-peer-deps
266-
# - name: Configure git
267-
# run: |
268-
# git config --global user.name "supabase-releaser[bot]"
269-
# git config --global user.email "supabase-releaser[bot]@users.noreply.github.com"
270-
271-
# - name: Release canary version
272-
# id: release
273-
# run: |
274-
# echo "Running nx release..."
275-
# npm run release-canary
276-
# env:
277-
# NPM_CONFIG_PROVENANCE: true
278-
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
279-
# RELEASE_GITHUB_TOKEN: ${{ steps.app-token.outputs.token }} # used for tags
280-
# notify-stable-failure:
281-
# name: Notify Slack for Stable failure
282-
# needs: release-stable
283-
# if: ${{ always() && github.event_name == 'workflow_dispatch' && needs.release-stable.result == 'failure' }}
284-
# uses: ./.github/workflows/slack-notify.yml
285-
# secrets: inherit
286-
# with:
287-
# subject: 'Stable Release'
288-
289-
# notify-canary-failure:
290-
# name: Notify Slack for Canary failure
291-
# needs: release-canary
292-
# if: ${{ always() && github.event_name == 'push' && needs.release-canary.result == 'failure' }}
293-
# uses: ./.github/workflows/slack-notify.yml
294-
# secrets: inherit
295-
# with:
296-
# subject: 'Canary Release'
74+
# fetch-depth: 0

0 commit comments

Comments
 (0)