Skip to content

Commit 38d495f

Browse files
authored
Merge branch 'dev' into promptless/document-jwt-restricted-claims
2 parents 0b873ea + efefa5d commit 38d495f

336 files changed

Lines changed: 25929 additions & 16447 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/db-migration-backwards-compatibility.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ jobs:
215215
run: pnpm test
216216

217217
- name: Verify data integrity
218-
run: pnpm run verify-data-integrity
218+
run: pnpm run verify-data-integrity --no-bail
219219

220220
- name: Print Docker Compose logs
221221
if: always()

.github/workflows/docker-server-build-run.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,13 @@ jobs:
2222
docker run -d --name db -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=password -e POSTGRES_DB=stackframe -p 8128:5432 postgres:latest
2323
sleep 5
2424
docker logs db
25+
26+
- name: Setup clickhouse
27+
run: |
28+
docker run -d --name clickhouse -e CLICKHOUSE_DB=analytics -e CLICKHOUSE_USER=stackframe -e CLICKHOUSE_PASSWORD=password -e CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT=1 -p 8133:8123 clickhouse/clickhouse-server:25.10
29+
sleep 5
30+
docker logs clickhouse
31+
2532
2633
- name: Build Docker image
2734
run: docker build -f docker/server/Dockerfile -t server .

.github/workflows/e2e-api-tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ jobs:
156156
run: pnpm test ${{ matrix.freestyle-mode == 'prod' && '--min-workers=1 --max-workers=1' || '' }}
157157

158158
- name: Verify data integrity
159-
run: pnpm run verify-data-integrity
159+
run: pnpm run verify-data-integrity --no-bail
160160

161161
- name: Print Docker Compose logs
162162
if: always()

.github/workflows/e2e-custom-base-port-api-tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ jobs:
150150
run: pnpm test
151151

152152
- name: Verify data integrity
153-
run: pnpm run verify-data-integrity
153+
run: pnpm run verify-data-integrity --no-bail
154154

155155
- name: Print Docker Compose logs
156156
if: always()

.github/workflows/e2e-source-of-truth-api-tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ jobs:
156156
run: pnpm test
157157

158158
- name: Verify data integrity
159-
run: pnpm run verify-data-integrity
159+
run: pnpm run verify-data-integrity --no-bail
160160

161161
- name: Print Docker Compose logs
162162
if: always()

.github/workflows/restart-dev-and-test-with-custom-base-port.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ env:
1616

1717
jobs:
1818
restart-dev-and-test-with-custom-base-port:
19-
runs-on: ubicloud-standard-8
19+
runs-on: ubicloud-standard-16
2020
env:
2121
NEXT_PUBLIC_STACK_PORT_PREFIX: "69"
2222

.github/workflows/restart-dev-and-test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ env:
1616

1717
jobs:
1818
restart-dev-and-test:
19-
runs-on: ubicloud-standard-8
19+
runs-on: ubicloud-standard-16
2020

2121
steps:
2222
- uses: actions/checkout@v6

.github/workflows/setup-tests-with-custom-base-port.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ env:
1616

1717
jobs:
1818
setup-tests-with-custom-base-port:
19-
runs-on: ubicloud-standard-8
19+
runs-on: ubicloud-standard-16
2020
env:
2121
NEXT_PUBLIC_STACK_PORT_PREFIX: "69"
2222

.github/workflows/setup-tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ env:
1616

1717
jobs:
1818
setup-tests:
19-
runs-on: ubicloud-standard-8
19+
runs-on: ubicloud-standard-16
2020
steps:
2121
- uses: actions/checkout@v6
2222

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
name: Publish Swift SDK to prerelease repo
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- 'sdks/implementations/swift/**'
9+
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: false # Don't cancel publishing in progress
13+
14+
jobs:
15+
publish:
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- name: Checkout source repo
20+
uses: actions/checkout@v4
21+
with:
22+
path: source
23+
24+
- name: Read version from package.json
25+
id: version
26+
run: |
27+
VERSION=$(jq -r '.version' source/sdks/implementations/swift/package.json)
28+
echo "version=$VERSION" >> $GITHUB_OUTPUT
29+
echo "Swift SDK version: $VERSION"
30+
31+
- name: Check if tag already exists in target repo
32+
id: check-tag
33+
run: |
34+
TAG="v${{ steps.version.outputs.version }}"
35+
echo "Checking if tag $TAG exists in stack-auth/swift-sdk-prerelease..."
36+
37+
# Use the GitHub API to check if the tag exists
38+
HTTP_STATUS=$(curl -s -o /dev/null -w "%{http_code}" \
39+
-H "Authorization: Bearer ${{ secrets.SWIFT_SDK_PUBLISH_TOKEN }}" \
40+
-H "Accept: application/vnd.github+json" \
41+
"https://api.github.com/repos/stack-auth/swift-sdk-prerelease/git/refs/tags/$TAG")
42+
43+
if [ "$HTTP_STATUS" = "200" ]; then
44+
echo "Tag $TAG already exists, skipping publish"
45+
echo "exists=true" >> $GITHUB_OUTPUT
46+
else
47+
echo "Tag $TAG does not exist, will publish"
48+
echo "exists=false" >> $GITHUB_OUTPUT
49+
fi
50+
51+
- name: Clone target repo
52+
if: steps.check-tag.outputs.exists == 'false'
53+
run: |
54+
git clone https://x-access-token:${{ secrets.SWIFT_SDK_PUBLISH_TOKEN }}@github.com/stack-auth/swift-sdk-prerelease.git target
55+
56+
- name: Copy Swift SDK to target repo
57+
if: steps.check-tag.outputs.exists == 'false'
58+
run: |
59+
# Remove all files except .git from target
60+
cd target
61+
find . -maxdepth 1 -not -name '.git' -not -name '.' -exec rm -rf {} +
62+
cd ..
63+
64+
# Copy everything from Swift SDK
65+
cp -r source/sdks/implementations/swift/* target/
66+
cp source/sdks/implementations/swift/.gitignore target/ 2>/dev/null || true
67+
68+
# Remove package.json (it's only for turborepo integration, not part of the Swift package)
69+
rm -f target/package.json
70+
71+
- name: Commit and push to target repo
72+
if: steps.check-tag.outputs.exists == 'false'
73+
run: |
74+
cd target
75+
git config user.email "github-actions[bot]@users.noreply.github.com"
76+
git config user.name "github-actions[bot]"
77+
78+
git add -A
79+
80+
# Check if there are changes to commit
81+
if git diff --staged --quiet; then
82+
echo "No changes to commit"
83+
else
84+
git commit -m "Release v${{ steps.version.outputs.version }}"
85+
fi
86+
87+
# Create and push tag
88+
TAG="v${{ steps.version.outputs.version }}"
89+
git tag "$TAG"
90+
git push origin main --tags
91+
92+
echo "Successfully published Swift SDK v${{ steps.version.outputs.version }}"
93+
94+
- name: Summary
95+
run: |
96+
if [ "${{ steps.check-tag.outputs.exists }}" = "true" ]; then
97+
echo "::notice::Skipped publishing - tag v${{ steps.version.outputs.version }} already exists"
98+
else
99+
echo "::notice::Published Swift SDK v${{ steps.version.outputs.version }} to stack-auth/swift-sdk-prerelease"
100+
fi

0 commit comments

Comments
 (0)