Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -101,16 +101,20 @@ jobs:
with:
fetch-depth: 0

- name: Setup Node.js 20
if: ${{ ! startsWith(github.head_ref, 'changeset-release/') }}
uses: actions/setup-node@v3
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: 20
cache: 'npm'
cache: "npm"
registry-url: "https://npm.pkg.github.com/"
scope: "@rebilly"
cache-dependency-path: "package-lock.json"

- name: Install Dependencies
if: ${{ ! startsWith(github.head_ref, 'changeset-release/') }}
run: npm ci
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Check Changesets
if: ${{ ! startsWith(github.head_ref, 'changeset-release/') }}
Expand Down
13 changes: 9 additions & 4 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
branches:
- main

concurrency:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

Expand All @@ -20,14 +20,19 @@ jobs:
fetch-depth: 0
token: ${{ secrets.MACHINE_USER_PAT }}

- name: Setup Node.js 20
uses: actions/setup-node@v3
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: 20
cache: 'npm'
cache: "npm"
registry-url: "https://npm.pkg.github.com/"
scope: "@rebilly"
cache-dependency-path: "package-lock.json"

- name: Install Dependencies
run: npm ci
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Create Release Pull Request
uses: changesets/action@v1
Expand Down
32 changes: 21 additions & 11 deletions .github/workflows/update.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,16 @@ jobs:
extensions: mbstring, intl, curl, json
tools: composer:v2

- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: 24
cache: "npm"
registry-url: "https://npm.pkg.github.com/"
scope: "@rebilly"
cache-dependency-path: "sdk/package-lock.json"


- name: Install api-definitions dependencies
working-directory: ./api-definitions
run: npm install
Expand All @@ -68,20 +78,18 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.MACHINE_USER_PAT }}

- name: Install Dependencies
working-directory: ./sdk
run: npm ci --dev
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Build SDK
working-directory: ./sdk
run: |
mkdir /tmp/sdk
docker run --rm \
-u $(id -u ${USER}):$(id -g ${USER}) \
-v "/tmp/sdk:/out" \
-v "$(pwd)/api-definitions/catalog:/api-definitions" \
ghcr.io/rebilly/regenerator:latest generate \
-g rebilly-php \
-D /out/openapi.json \
-o /out \
-C '{"rootNameSpace": "Rebilly.Sdk", "customOperationGroupMapping": "/shared/custom-resource-names.json"}' \
"/api-definitions/all.yaml"
ls -lAh /tmp/ /tmp/sdk/
rm -rf src
npm run generate /tmp/sdk ../api-definitions/catalog/all.yaml

- name: Bundle SDK
run: |
Expand Down Expand Up @@ -129,6 +137,8 @@ jobs:
echo "Added a patch changeset '${CHANGESET_ID}': '${{ github.event.inputs.trigger-reason }}'"
echo "id=${CHANGESET_ID}" >> $GITHUB_OUTPUT
fi
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Create PR
id: cpr
Expand Down
Loading
Loading