chore: update release actions related to docs and starter (#9713)
* chore: update release actions related to docs and starter * change name
This commit is contained in:
1 parent
3c0f0e2259
commit
af3c6b0d93
5 files changed
+168
-437
No files matched your search
@@ -1,179 +0,0 @@
|
|||||||
name: Generate Docblocks [Automated]
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- develop
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
generate:
|
|
||||||
name: Generated TSDoc PRs
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout Repo
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Setup Node.js 20
|
|
||||||
uses: actions/setup-node@v3
|
|
||||||
with:
|
|
||||||
node-version: 20
|
|
||||||
|
|
||||||
- name: Install Dependencies
|
|
||||||
run: yarn
|
|
||||||
|
|
||||||
- name: Build Dependencies
|
|
||||||
run: yarn build
|
|
||||||
|
|
||||||
- name: Install www/utils Dependencies
|
|
||||||
run: yarn
|
|
||||||
working-directory: www/utils
|
|
||||||
|
|
||||||
- name: Build packages
|
|
||||||
run: yarn build
|
|
||||||
working-directory: www/utils
|
|
||||||
|
|
||||||
- name: Check Commit
|
|
||||||
id: check-commit
|
|
||||||
run: "yarn check:release-commit ${{ github.sha }}"
|
|
||||||
working-directory: www/utils/packages/scripts
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
GIT_OWNER: ${{ github.repository_owner }}
|
|
||||||
GIT_REPO: medusa
|
|
||||||
|
|
||||||
- name: Run docblock generator
|
|
||||||
if: steps.check-commit.outputs.is_release_commit == 'true'
|
|
||||||
run: "yarn start run:release --type docs"
|
|
||||||
working-directory: www/utils/packages/docs-generator
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
GIT_OWNER: ${{ github.repository_owner }}
|
|
||||||
GIT_REPO: medusa
|
|
||||||
|
|
||||||
- name: Generate Changeset
|
|
||||||
if: steps.check-commit.outputs.is_release_commit == 'true'
|
|
||||||
run: "yarn generate:changeset"
|
|
||||||
working-directory: www/utils/packages/scripts
|
|
||||||
|
|
||||||
- name: Create Pull Request
|
|
||||||
if: steps.check-commit.outputs.is_release_commit == 'true'
|
|
||||||
uses: peter-evans/create-pull-request@v5
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
with:
|
|
||||||
title: "chore(docs): Generated TSDocs"
|
|
||||||
body: "This PR holds all generated TSDocs for the upcoming release."
|
|
||||||
branch: "chore/generate-tsdocs"
|
|
||||||
branch-suffix: "timestamp"
|
|
||||||
add-paths: packages/**
|
|
||||||
generate-oas:
|
|
||||||
name: Generated OAS PR
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout Repo
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Setup Node.js 20
|
|
||||||
uses: actions/setup-node@v3
|
|
||||||
with:
|
|
||||||
node-version: 20
|
|
||||||
|
|
||||||
- name: Install Dependencies
|
|
||||||
run: yarn
|
|
||||||
|
|
||||||
- name: Build Dependencies
|
|
||||||
run: yarn build
|
|
||||||
|
|
||||||
- name: Install www/utils Dependencies
|
|
||||||
run: yarn
|
|
||||||
working-directory: www/utils
|
|
||||||
|
|
||||||
- name: Build packages
|
|
||||||
run: yarn build
|
|
||||||
working-directory: www/utils
|
|
||||||
|
|
||||||
- name: Check Commit
|
|
||||||
id: check-commit
|
|
||||||
run: "yarn check:release-commit ${{ github.sha }}"
|
|
||||||
working-directory: www/utils/packages/scripts
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
GIT_OWNER: ${{ github.repository_owner }}
|
|
||||||
GIT_REPO: medusa
|
|
||||||
|
|
||||||
- name: Run docblock generator
|
|
||||||
if: steps.check-commit.outputs.is_release_commit == 'true'
|
|
||||||
run: "yarn generate:oas"
|
|
||||||
working-directory: www/utils
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
GIT_OWNER: ${{ github.repository_owner }}
|
|
||||||
GIT_REPO: medusa
|
|
||||||
|
|
||||||
- name: Create Pull Request
|
|
||||||
if: steps.check-commit.outputs.is_release_commit == 'true'
|
|
||||||
uses: peter-evans/create-pull-request@v5
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
with:
|
|
||||||
title: "chore(docs): Generated OAS"
|
|
||||||
body: "This PR holds all generated OAS for the upcoming release."
|
|
||||||
branch: "chore/generate-oas"
|
|
||||||
branch-suffix: "timestamp"
|
|
||||||
add-paths: www/utils/generated/oas-output/**
|
|
||||||
generate-dml:
|
|
||||||
name: Generated DML JSON files PR
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout Repo
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Setup Node.js 20
|
|
||||||
uses: actions/setup-node@v3
|
|
||||||
with:
|
|
||||||
node-version: 20
|
|
||||||
|
|
||||||
- name: Install Dependencies
|
|
||||||
run: yarn
|
|
||||||
|
|
||||||
- name: Build Dependencies
|
|
||||||
run: yarn build
|
|
||||||
|
|
||||||
- name: Install www/utils Dependencies
|
|
||||||
run: yarn
|
|
||||||
working-directory: www/utils
|
|
||||||
|
|
||||||
- name: Build packages
|
|
||||||
run: yarn build
|
|
||||||
working-directory: www/utils
|
|
||||||
|
|
||||||
- name: Check Commit
|
|
||||||
id: check-commit
|
|
||||||
run: "yarn check:release-commit ${{ github.sha }}"
|
|
||||||
working-directory: www/utils/packages/scripts
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
GIT_OWNER: ${{ github.repository_owner }}
|
|
||||||
GIT_REPO: medusa
|
|
||||||
|
|
||||||
- name: Run docblock generator
|
|
||||||
if: steps.check-commit.outputs.is_release_commit == 'true'
|
|
||||||
run: "yarn generate:dml"
|
|
||||||
working-directory: www/utils
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
GIT_OWNER: ${{ github.repository_owner }}
|
|
||||||
GIT_REPO: medusa
|
|
||||||
|
|
||||||
- name: Create Pull Request
|
|
||||||
if: steps.check-commit.outputs.is_release_commit == 'true'
|
|
||||||
uses: peter-evans/create-pull-request@v5
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
with:
|
|
||||||
title: "chore(docs): Generated DML JSON files"
|
|
||||||
body: "This PR holds all generated DML JSON files for the upcoming release."
|
|
||||||
branch: "chore/generate-dml-json"
|
|
||||||
branch-suffix: "timestamp"
|
|
||||||
add-paths: www/utils/generated/dml-output/**
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
name: Generate Public References
|
name: Update References on Release
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
@@ -6,12 +6,100 @@ on:
|
|||||||
description: "Reference to Generate. Use either `all` to generate all references, `api` to generate the API reference, or `ui` to generate UI reference."
|
description: "Reference to Generate. Use either `all` to generate all references, `api` to generate the API reference, or `ui` to generate UI reference."
|
||||||
required: false
|
required: false
|
||||||
default: "all"
|
default: "all"
|
||||||
# Disable this action until v2 is out of RC
|
release:
|
||||||
# release:
|
types: [published]
|
||||||
# types: [published]
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
api-v2:
|
update-starter:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- if: ${{ github.event_name == 'release' }}
|
||||||
|
run: |
|
||||||
|
curl -X POST \
|
||||||
|
-H "Authorization: Bearer ${{ secrets.STARTER_ACCESS_TOKEN }}" \
|
||||||
|
-H "Accept: application/vnd.github.v3+json" \
|
||||||
|
https://api.github.com/repos/medusajs/medusa-starter-default/actions/workflows/update-preview-deps.yml/dispatches \
|
||||||
|
-d '{"ref":"master"}'
|
||||||
|
references:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
if: ${{ github.event_name == 'release' || github.event_name == 'workflow_dispatch'}}
|
||||||
|
steps:
|
||||||
|
- name: Cancel Previous Runs
|
||||||
|
uses: styfle/cancel-workflow-action@0.11.0
|
||||||
|
with:
|
||||||
|
access_token: ${{ github.token }}
|
||||||
|
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Setup Node.js environment
|
||||||
|
uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version: 20
|
||||||
|
cache: "yarn"
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
uses: ./.github/actions/cache-deps
|
||||||
|
with:
|
||||||
|
extension: reference
|
||||||
|
|
||||||
|
- name: Build Packages
|
||||||
|
run: yarn build
|
||||||
|
|
||||||
|
- name: Install Docs dependencies
|
||||||
|
working-directory: www
|
||||||
|
run: yarn install
|
||||||
|
|
||||||
|
- name: Build Docs packages
|
||||||
|
working-directory: www
|
||||||
|
run: yarn build:packages
|
||||||
|
|
||||||
|
- name: Install Workspace dependencies
|
||||||
|
run: yarn install
|
||||||
|
working-directory: www/utils
|
||||||
|
|
||||||
|
- name: Build Workspace packages
|
||||||
|
run: yarn build
|
||||||
|
working-directory: www/utils
|
||||||
|
|
||||||
|
- name: Generate References
|
||||||
|
if: ${{ github.event_name == 'workflow_dispatch' }}
|
||||||
|
run: "yarn start generate ${{ github.event.inputs.referenceName || 'all' }} --merge"
|
||||||
|
working-directory: www/utils/packages/typedoc-generate-references
|
||||||
|
|
||||||
|
- name: Generate References
|
||||||
|
if: ${{ github.event_name != 'workflow_dispatch' }}
|
||||||
|
run: "yarn generate:references"
|
||||||
|
working-directory: www/utils
|
||||||
|
|
||||||
|
- name: Generate Sidebar and File Map
|
||||||
|
run: "yarn prep"
|
||||||
|
working-directory: www/apps/resources
|
||||||
|
|
||||||
|
- name: Get PR Message
|
||||||
|
id: pr-message
|
||||||
|
run: yarn generate:message
|
||||||
|
working-directory: www/utils/packages/scripts
|
||||||
|
|
||||||
|
- name: Create Pull Request
|
||||||
|
uses: peter-evans/create-pull-request@v4
|
||||||
|
with:
|
||||||
|
commit-message: "chore(docs): Generated References (automated)"
|
||||||
|
base: "develop"
|
||||||
|
title: "chore(docs): Generated References (automated)"
|
||||||
|
labels: "type: chore"
|
||||||
|
add-paths: |
|
||||||
|
www/apps/resources/references/**
|
||||||
|
www/apps/resources/generated/**
|
||||||
|
www/utils/generated/typedoc-json-output
|
||||||
|
branch: "docs/generate-reference"
|
||||||
|
branch-suffix: "timestamp"
|
||||||
|
body: ${{ steps.pr-message.outputs.body }}
|
||||||
|
|
||||||
|
api:
|
||||||
|
name: Generate OAS
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: ${{ github.event_name == 'release' || github.event_name == 'workflow_dispatch' || github.event.inputs.referenceName == 'all' || github.event.inputs.referenceName == 'api' }}
|
if: ${{ github.event_name == 'release' || github.event_name == 'workflow_dispatch' || github.event.inputs.referenceName == 'all' || github.event.inputs.referenceName == 'api' }}
|
||||||
steps:
|
steps:
|
||||||
@@ -39,29 +127,92 @@ jobs:
|
|||||||
- name: Build Packages
|
- name: Build Packages
|
||||||
run: yarn build
|
run: yarn build
|
||||||
|
|
||||||
- name: Generate API Reference (v2)
|
- name: Install www/utils Dependencies
|
||||||
run: yarn openapi:generate
|
run: yarn
|
||||||
|
|
||||||
- name: Install and Build www/utils dependencies
|
|
||||||
run: yarn && yarn build
|
|
||||||
working-directory: www/utils
|
working-directory: www/utils
|
||||||
|
|
||||||
- name: Generate Changeset
|
- name: Build www/utils packages
|
||||||
run: "yarn generate:changeset"
|
run: yarn build
|
||||||
working-directory: www/utils/packages/scripts
|
working-directory: www/utils
|
||||||
|
|
||||||
|
- name: Run docblock generator
|
||||||
|
run: "yarn generate:oas"
|
||||||
|
working-directory: www/utils
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
GIT_OWNER: ${{ github.repository_owner }}
|
||||||
|
GIT_REPO: medusa
|
||||||
|
|
||||||
|
- name: Generate API Reference
|
||||||
|
run: yarn openapi:generate
|
||||||
|
|
||||||
- name: Create Pull Request
|
- name: Create Pull Request
|
||||||
uses: peter-evans/create-pull-request@v4
|
uses: peter-evans/create-pull-request@v4
|
||||||
with:
|
with:
|
||||||
commit-message: "chore(docs): Generated API Reference (v2)"
|
commit-message: "chore(docs): Generated API Reference (automated)"
|
||||||
base: "develop"
|
base: "develop"
|
||||||
title: "chore(docs): Updated API Reference (v2)"
|
title: "chore(docs): Updated API Reference (automated)"
|
||||||
labels: "type: chore"
|
labels: "type: chore"
|
||||||
add-paths: |
|
add-paths: |
|
||||||
www/apps/api-reference/specs
|
www/apps/api-reference/specs
|
||||||
www/utils/generated/oas-output
|
www/utils/generated/oas-output
|
||||||
branch: "docs/generate-api-ref"
|
branch: "docs/generate-api-ref"
|
||||||
branch-suffix: "timestamp"
|
branch-suffix: "timestamp"
|
||||||
|
dml:
|
||||||
|
name: Generate DML JSON files
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Cancel Previous Runs
|
||||||
|
uses: styfle/cancel-workflow-action@0.11.0
|
||||||
|
with:
|
||||||
|
access_token: ${{ github.token }}
|
||||||
|
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Setup Node.js environment
|
||||||
|
uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version: 20
|
||||||
|
cache: "yarn"
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
uses: ./.github/actions/cache-deps
|
||||||
|
with:
|
||||||
|
extension: reference
|
||||||
|
|
||||||
|
- name: Build Packages
|
||||||
|
run: yarn build
|
||||||
|
|
||||||
|
- name: Install www/utils Dependencies
|
||||||
|
run: yarn
|
||||||
|
working-directory: www/utils
|
||||||
|
|
||||||
|
- name: Build www/utils packages
|
||||||
|
run: yarn build
|
||||||
|
working-directory: www/utils
|
||||||
|
|
||||||
|
- name: Run docblock generator
|
||||||
|
run: "yarn generate:dml"
|
||||||
|
working-directory: www/utils
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
GIT_OWNER: ${{ github.repository_owner }}
|
||||||
|
GIT_REPO: medusa
|
||||||
|
|
||||||
|
- name: Create Pull Request
|
||||||
|
uses: peter-evans/create-pull-request@v4
|
||||||
|
with:
|
||||||
|
commit-message: "chore(docs): Generated DML JSON files (automated)"
|
||||||
|
title: "chore(docs): Generated DML JSON files (automated)"
|
||||||
|
body: "This PR holds all generated DML JSON files for the upcoming release."
|
||||||
|
branch: "chore/generate-dml-json"
|
||||||
|
branch-suffix: "timestamp"
|
||||||
|
add-paths: www/utils/generated/dml-output/**
|
||||||
|
base: "develop"
|
||||||
|
labels: "type: chore"
|
||||||
ui:
|
ui:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: ${{ github.event_name == 'release' || github.event_name == 'workflow_dispatch' || github.event.inputs.referenceName == 'all' || github.event.inputs.referenceName == 'ui' }}
|
if: ${{ github.event_name == 'release' || github.event_name == 'workflow_dispatch' || github.event.inputs.referenceName == 'all' || github.event.inputs.referenceName == 'ui' }}
|
||||||
@@ -102,16 +253,12 @@ jobs:
|
|||||||
run: yarn generate:ui
|
run: yarn generate:ui
|
||||||
working-directory: www/utils/packages/react-docs-generator
|
working-directory: www/utils/packages/react-docs-generator
|
||||||
|
|
||||||
- name: Generate Changeset
|
|
||||||
run: "yarn generate:changeset"
|
|
||||||
working-directory: www/utils/packages/scripts
|
|
||||||
|
|
||||||
- name: Create Pull Request
|
- name: Create Pull Request
|
||||||
uses: peter-evans/create-pull-request@v4
|
uses: peter-evans/create-pull-request@v4
|
||||||
with:
|
with:
|
||||||
commit-message: "chore(docs): Generated UI Reference"
|
commit-message: "chore(docs): Generated UI Reference (automated)"
|
||||||
base: "develop"
|
base: "develop"
|
||||||
title: "chore(docs): Updated UI Reference"
|
title: "chore(docs): Updated UI Reference (automated)"
|
||||||
labels: "type: chore"
|
labels: "type: chore"
|
||||||
add-paths: www/apps/ui/src/specs
|
add-paths: www/apps/ui/src/specs
|
||||||
branch: "docs/generate-ui-ref"
|
branch: "docs/generate-ui-ref"
|
||||||
|
|||||||
@@ -1,120 +0,0 @@
|
|||||||
name: Generate RC Reference [Automated]
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
workflow_call:
|
|
||||||
jobs:
|
|
||||||
rc-references:
|
|
||||||
uses: ./.github/workflows/generate-resources-reference.yml
|
|
||||||
rc-api:
|
|
||||||
name: Generate OAS
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Cancel Previous Runs
|
|
||||||
uses: styfle/cancel-workflow-action@0.11.0
|
|
||||||
with:
|
|
||||||
access_token: ${{ github.token }}
|
|
||||||
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Setup Node.js environment
|
|
||||||
uses: actions/setup-node@v3
|
|
||||||
with:
|
|
||||||
node-version: 20
|
|
||||||
cache: "yarn"
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
uses: ./.github/actions/cache-deps
|
|
||||||
with:
|
|
||||||
extension: reference
|
|
||||||
|
|
||||||
- name: Build Packages
|
|
||||||
run: yarn build
|
|
||||||
|
|
||||||
- name: Install www/utils Dependencies
|
|
||||||
run: yarn
|
|
||||||
working-directory: www/utils
|
|
||||||
|
|
||||||
- name: Build www/utils packages
|
|
||||||
run: yarn build
|
|
||||||
working-directory: www/utils
|
|
||||||
|
|
||||||
- name: Run docblock generator
|
|
||||||
run: "yarn generate:oas"
|
|
||||||
working-directory: www/utils
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
GIT_OWNER: ${{ github.repository_owner }}
|
|
||||||
GIT_REPO: medusa
|
|
||||||
|
|
||||||
- name: Generate API Reference (v2)
|
|
||||||
run: yarn openapi:generate
|
|
||||||
|
|
||||||
- name: Create Pull Request
|
|
||||||
uses: peter-evans/create-pull-request@v4
|
|
||||||
with:
|
|
||||||
commit-message: "chore(docs): Generated API Reference (v2)"
|
|
||||||
base: "develop"
|
|
||||||
title: "chore(docs): Updated API Reference (v2)"
|
|
||||||
labels: "type: chore"
|
|
||||||
add-paths: |
|
|
||||||
www/apps/api-reference/specs
|
|
||||||
www/utils/generated/oas-output
|
|
||||||
branch: "docs/generate-api-ref"
|
|
||||||
branch-suffix: "timestamp"
|
|
||||||
rc-dml:
|
|
||||||
name: Generate DML JSON files
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Cancel Previous Runs
|
|
||||||
uses: styfle/cancel-workflow-action@0.11.0
|
|
||||||
with:
|
|
||||||
access_token: ${{ github.token }}
|
|
||||||
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Setup Node.js environment
|
|
||||||
uses: actions/setup-node@v3
|
|
||||||
with:
|
|
||||||
node-version: 20
|
|
||||||
cache: "yarn"
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
uses: ./.github/actions/cache-deps
|
|
||||||
with:
|
|
||||||
extension: reference
|
|
||||||
|
|
||||||
- name: Build Packages
|
|
||||||
run: yarn build
|
|
||||||
|
|
||||||
- name: Install www/utils Dependencies
|
|
||||||
run: yarn
|
|
||||||
working-directory: www/utils
|
|
||||||
|
|
||||||
- name: Build www/utils packages
|
|
||||||
run: yarn build
|
|
||||||
working-directory: www/utils
|
|
||||||
|
|
||||||
- name: Run docblock generator
|
|
||||||
run: "yarn generate:dml"
|
|
||||||
working-directory: www/utils
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
GIT_OWNER: ${{ github.repository_owner }}
|
|
||||||
GIT_REPO: medusa
|
|
||||||
|
|
||||||
- name: Create Pull Request
|
|
||||||
uses: peter-evans/create-pull-request@v4
|
|
||||||
with:
|
|
||||||
title: "chore(docs): Generated DML JSON files"
|
|
||||||
body: "This PR holds all generated DML JSON files for the upcoming release."
|
|
||||||
branch: "chore/generate-dml-json"
|
|
||||||
branch-suffix: "timestamp"
|
|
||||||
add-paths: www/utils/generated/dml-output/**
|
|
||||||
base: "develop"
|
|
||||||
labels: "type: chore"
|
|
||||||
@@ -1,98 +0,0 @@
|
|||||||
name: Generate Resources References [Automated]
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
branches:
|
|
||||||
- develop
|
|
||||||
types:
|
|
||||||
- closed
|
|
||||||
workflow_call:
|
|
||||||
workflow_dispatch:
|
|
||||||
inputs:
|
|
||||||
referenceName:
|
|
||||||
description: "Reference to Generate. Use either `all` or a name defined in `www/utils/packages/typedoc-generate-references/src/constants/references.ts` such as `product`."
|
|
||||||
required: false
|
|
||||||
default: "all"
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
references:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
if: github.event_name == 'workflow_dispatch' || github.event_name == 'release' || (startsWith(github.head_ref, 'chore/generate-tsdocs') && github.event.pull_request.merged == true)
|
|
||||||
steps:
|
|
||||||
- name: Cancel Previous Runs
|
|
||||||
uses: styfle/cancel-workflow-action@0.11.0
|
|
||||||
with:
|
|
||||||
access_token: ${{ github.token }}
|
|
||||||
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Setup Node.js environment
|
|
||||||
uses: actions/setup-node@v3
|
|
||||||
with:
|
|
||||||
node-version: 20
|
|
||||||
cache: "yarn"
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
uses: ./.github/actions/cache-deps
|
|
||||||
with:
|
|
||||||
extension: reference
|
|
||||||
|
|
||||||
- name: Build Packages
|
|
||||||
run: yarn build
|
|
||||||
|
|
||||||
- name: Install Docs dependencies
|
|
||||||
working-directory: www
|
|
||||||
run: yarn install
|
|
||||||
|
|
||||||
- name: Build Docs packages
|
|
||||||
working-directory: www
|
|
||||||
run: yarn build:packages
|
|
||||||
|
|
||||||
- name: Install Workspace dependencies
|
|
||||||
run: yarn install
|
|
||||||
working-directory: www/utils
|
|
||||||
|
|
||||||
- name: Build Workspace packages
|
|
||||||
run: yarn build
|
|
||||||
working-directory: www/utils
|
|
||||||
|
|
||||||
- name: Generate References
|
|
||||||
if: ${{ github.event_name == 'workflow_dispatch' }}
|
|
||||||
run: "yarn start generate ${{ github.event.inputs.referenceName || 'all' }} --merge"
|
|
||||||
working-directory: www/utils/packages/typedoc-generate-references
|
|
||||||
|
|
||||||
- name: Generate References
|
|
||||||
if: ${{ github.event_name != 'workflow_dispatch' }}
|
|
||||||
run: "yarn generate:references"
|
|
||||||
working-directory: www/utils
|
|
||||||
|
|
||||||
- name: Generate Sidebar and File Map
|
|
||||||
run: "yarn prep"
|
|
||||||
working-directory: www/apps/resources
|
|
||||||
|
|
||||||
- name: Generate Changeset
|
|
||||||
run: "yarn generate:changeset"
|
|
||||||
working-directory: www/utils/packages/scripts
|
|
||||||
|
|
||||||
- name: Get PR Message
|
|
||||||
id: pr-message
|
|
||||||
run: yarn generate:message
|
|
||||||
working-directory: www/utils/packages/scripts
|
|
||||||
|
|
||||||
- name: Create Pull Request
|
|
||||||
uses: peter-evans/create-pull-request@v4
|
|
||||||
with:
|
|
||||||
commit-message: "chore(docs): Generated References (automated)"
|
|
||||||
base: "develop"
|
|
||||||
title: "chore(docs): Generated References"
|
|
||||||
labels: "type: chore"
|
|
||||||
add-paths: |
|
|
||||||
www/apps/resources/references/**
|
|
||||||
www/apps/resources/generated/**
|
|
||||||
www/utils/generated/typedoc-json-output
|
|
||||||
branch: "docs/generate-reference"
|
|
||||||
branch-suffix: "timestamp"
|
|
||||||
body: ${{ steps.pr-message.outputs.body }}
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
name: Update on RC Release
|
|
||||||
|
|
||||||
on:
|
|
||||||
release:
|
|
||||||
types: [published]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
deploy:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- if: ${{ contains(github.event.release.tag_name, 'rc') }}
|
|
||||||
run: |
|
|
||||||
curl -X POST \
|
|
||||||
-H "Authorization: Bearer ${{ secrets.STARTER_ACCESS_TOKEN }}" \
|
|
||||||
-H "Accept: application/vnd.github.v3+json" \
|
|
||||||
https://api.github.com/repos/medusajs/medusa-starter-default/actions/workflows/update-preview-deps.yml/dispatches \
|
|
||||||
-d '{"ref":"master"}'
|
|
||||||
generate-references:
|
|
||||||
uses: ./.github/workflows/generate-rc-references.yml
|
|
||||||
Reference in new issue
Block a user