chore(deps): update nextjs monorepo to ^13.5.8 #1650
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build & Publish | |
on: | |
pull_request: | |
branches: | |
- '**' | |
push: | |
branches: | |
- main | |
tags: | |
- 'v[0-9]+.[0-9]+.[0-9]+' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
strategy: | |
matrix: | |
package: | |
[ | |
'wallet:backend', | |
'wallet:frontend', | |
'boutique:backend', | |
'boutique:frontend' | |
] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v3 | |
with: | |
version: v9.1.4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: '20' | |
cache: 'pnpm' | |
- name: Install dependencies for ${{ matrix.package }} | |
shell: bash | |
run: | | |
pnpm ${{ matrix.package }} install --frozen-lockfile | |
- name: Run build | |
run: | | |
pnpm ${{ matrix.package }} build | |
publish: | |
runs-on: ubuntu-latest | |
needs: build | |
timeout-minutes: 15 | |
if: startsWith(github.ref, 'refs/tags/v') | |
strategy: | |
matrix: | |
package: | |
- name: test-wallet-backend | |
identifier: 'wallet:backend' | |
path: packages/wallet/backend | |
- name: test-wallet-frontend | |
identifier: 'wallet:frontend' | |
path: packages/wallet/frontend | |
port: 4003 | |
cookie_name: testnet.cookie | |
backend_url: https://api.wallet.interledger-test.dev | |
open_payments_host: $ilp.interledger-test.dev/ | |
auth_host: https://auth.interledger-test.dev | |
gatehub_env: sandbox | |
theme: dark | |
- name: test-wallet-frontend-cards | |
identifier: 'wallet:frontend' | |
path: packages/wallet/frontend | |
port: 4003 | |
cookie_name: interledgercards.cookie | |
backend_url: https://api.interledger.cards | |
open_payments_host: $ilp.dev/ | |
auth_host: https://auth.interledger.cards | |
gatehub_env: production | |
theme: light | |
- name: test-boutique-frontend | |
identifier: 'boutique:frontend' | |
path: packages/boutique/frontend | |
api_base_url: 'https://api.boutique.interledger-test.dev' | |
currency: 'USD' | |
theme: dark | |
- name: test-boutique-frontend-jopacc | |
identifier: 'boutique:frontend' | |
path: packages/boutique/frontend | |
api_base_url: 'https://api.boutique.jopacc.openpayments.directory' | |
currency: 'JOD' | |
theme: light | |
- name: test-boutique-backend | |
identifier: 'boutique:backend' | |
path: packages/boutique/backend | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to GHCR | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Docker build and push | |
uses: docker/build-push-action@v6 | |
with: | |
context: ./ | |
push: true | |
file: ${{ matrix.package.path }}/Dockerfile.prod | |
build-args: | | |
${{ matrix.package.identifier == 'boutique:frontend' && format('VITE_API_BASE_URL={0}', matrix.package.api_base_url) || '' }} | |
${{ matrix.package.identifier == 'boutique:frontend' && format('VITE_CURRENCY={0}', matrix.package.currency) || '' }} | |
${{ matrix.package.identifier == 'boutique:frontend' && format('VITE_THEME={0}', matrix.package.theme) || '' }} | |
${{ matrix.package.identifier == 'wallet:frontend' && format('PORT={0}', matrix.package.port) || '' }} | |
${{ matrix.package.identifier == 'wallet:frontend' && format('COOKIE_NAME={0}', matrix.package.cookie_name) || '' }} | |
${{ matrix.package.identifier == 'wallet:frontend' && format('NEXT_PUBLIC_BACKEND_URL={0}', matrix.package.backend_url) || '' }} | |
${{ matrix.package.identifier == 'wallet:frontend' && format('NEXT_PUBLIC_OPEN_PAYMENTS_HOST={0}', matrix.package.open_payments_host) || '' }} | |
${{ matrix.package.identifier == 'wallet:frontend' && format('NEXT_PUBLIC_AUTH_HOST={0}', matrix.package.auth_host) || '' }} | |
${{ matrix.package.identifier == 'wallet:frontend' && format('NEXT_PUBLIC_GATEHUB_ENV={0}', matrix.package.gatehub_env) || '' }} | |
${{ matrix.package.identifier == 'wallet:frontend' && format('NEXT_PUBLIC_THEME={0}', matrix.package.theme) || '' }} | |
tags: ghcr.io/${{ github.repository_owner }}/${{ matrix.package.name }}:${{ github.ref_name }},ghcr.io/${{ github.repository_owner }}/${{ matrix.package.name }}:latest | |
generate-release: | |
runs-on: ubuntu-latest | |
needs: publish | |
timeout-minutes: 5 | |
if: startsWith(github.ref, 'refs/tags/v') | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Update CHANGELOG | |
id: changelog | |
uses: requarks/changelog-action@v1 | |
with: | |
token: ${{ github.token }} | |
tag: ${{ github.ref_name }} | |
- name: Create Release | |
uses: ncipollo/[email protected] | |
with: | |
allowUpdates: true | |
draft: false | |
makeLatest: true | |
name: ${{ github.ref_name }} | |
body: ${{ steps.changelog.outputs.changes }} | |
tag: ${{ github.ref_name }} | |
token: ${{ github.token }} | |
- name: Commit CHANGELOG.md | |
uses: stefanzweifel/git-auto-commit-action@v5 | |
with: | |
branch: main | |
commit_message: 'docs: update CHANGELOG.md for ${{ github.ref_name }} [skip ci]' | |
file_pattern: CHANGELOG.md |