Skip to content

Commit 5795f06

Browse files
authored
Merge pull request #372 from openwallet-foundation-labs/fix/playground-ci
fix: ci
2 parents b317b0e + 23725b3 commit 5795f06

File tree

48 files changed

+39
-11236
lines changed

Some content is hidden

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

48 files changed

+39
-11236
lines changed

.github/workflows/ci-and-release.yml

Lines changed: 39 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -200,32 +200,6 @@ jobs:
200200
- name: Build webhook
201201
run: pnpm --filter test-rp build
202202

203-
build-playground:
204-
name: Build Playground
205-
permissions:
206-
contents: read
207-
runs-on: ubuntu-latest
208-
needs: [lint]
209-
steps:
210-
- uses: actions/checkout@v6
211-
212-
- uses: pnpm/action-setup@v4
213-
name: Install pnpm
214-
with:
215-
run_install: false
216-
217-
- name: Install Node.js
218-
uses: actions/setup-node@v6
219-
with:
220-
node-version: 22
221-
cache: 'pnpm'
222-
223-
- name: Install dependencies
224-
run: pnpm install
225-
226-
- name: Build playground
227-
run: pnpm --filter @eudiplo/playground build
228-
229203
build-doc:
230204
name: Build Documentation
231205
permissions:
@@ -274,14 +248,7 @@ jobs:
274248
contents: read
275249
name: E2E Tests
276250
runs-on: ubuntu-latest
277-
needs:
278-
[
279-
build-backend,
280-
build-client,
281-
build-verifier,
282-
build-webhook,
283-
build-playground,
284-
]
251+
needs: [build-backend, build-client, build-verifier, build-webhook]
285252
steps:
286253
- uses: actions/checkout@v6
287254

@@ -510,36 +477,53 @@ jobs:
510477
cache-from: type=gha
511478
cache-to: type=gha,mode=max
512479

513-
docker-playground:
514-
name: Build & Push Playground Docker Image
515-
needs: [build-playground]
480+
# =============================================================================
481+
# NPM Pre-release (Main Branch Only)
482+
# Publishes @eudiplo/sdk-core with a "main" tag as a pre-release version.
483+
# =============================================================================
484+
npm-prerelease:
485+
name: Publish SDK Pre-release to npm
486+
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
487+
needs: [build-sdk-core]
516488
runs-on: ubuntu-latest
517489
permissions:
518490
contents: read
519-
packages: write
520491
steps:
521492
- uses: actions/checkout@v6
522493

523-
- name: Set up Docker Buildx
524-
uses: docker/setup-buildx-action@v3
525-
526-
- name: Log in to GitHub Container Registry
527-
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
528-
uses: docker/login-action@v3
494+
- uses: pnpm/action-setup@v4
495+
name: Install pnpm
529496
with:
530-
registry: ghcr.io
531-
username: ${{ github.actor }}
532-
password: ${{ secrets.GITHUB_TOKEN }}
497+
run_install: false
533498

534-
- name: Build and push Playground Docker image
535-
uses: docker/build-push-action@v6
499+
- name: Install Node.js
500+
uses: actions/setup-node@v6
536501
with:
537-
context: .
538-
file: apps/playground/Dockerfile
539-
push: ${{ github.ref == 'refs/heads/main' && github.event_name == 'push' }}
540-
tags: ghcr.io/openwallet-foundation-labs/eudiplo-playground:main
541-
cache-from: type=gha
542-
cache-to: type=gha,mode=max
502+
node-version: 22
503+
cache: 'pnpm'
504+
registry-url: 'https://registry.npmjs.org'
505+
506+
- name: Install dependencies
507+
run: pnpm install
508+
509+
- name: Build SDK
510+
run: pnpm --filter @eudiplo/sdk-core build
511+
512+
- name: Set pre-release version
513+
working-directory: packages/eudiplo-sdk-core
514+
run: |
515+
# Get current version and append commit SHA for uniqueness
516+
CURRENT_VERSION=$(node -p "require('./package.json').version")
517+
SHORT_SHA=$(echo "${{ github.sha }}" | cut -c1-7)
518+
PRE_VERSION="${CURRENT_VERSION}-main.${SHORT_SHA}"
519+
echo "Publishing version: ${PRE_VERSION}"
520+
npm version "${PRE_VERSION}" --no-git-tag-version
521+
522+
- name: Publish to npm with main tag
523+
working-directory: packages/eudiplo-sdk-core
524+
env:
525+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
526+
run: npm publish --tag main --access public
543527

544528
# =============================================================================
545529
# Versioned Release (Manual Trigger Only)

apps/dcapi/.gitignore

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

apps/dcapi/.vscode/settings.json

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

apps/dcapi/README.md

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

0 commit comments

Comments
 (0)