-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
127 additions
and
141 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"typedoc-plugin-mermaid": minor | ||
--- | ||
|
||
Update CI/CD Workflow |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
name: Setup Action | ||
description: Composite Setup Action | ||
runs: | ||
using: composite | ||
steps: | ||
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 | ||
- uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0 | ||
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 | ||
with: | ||
node-version-file: ./.node-version | ||
cache: pnpm | ||
- name: Install Dependencies | ||
run: pnpm install --frozen-lockfile |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
name: CI/CD | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
check_format: | ||
name: Check format | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
steps: | ||
- name: Setup | ||
uses: ./.github/actions/setup.yaml | ||
- name: Check format | ||
run: pnpm lint | ||
env: | ||
CI: true | ||
|
||
check_type: | ||
name: Check type | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
steps: | ||
- name: Setup | ||
uses: ./.github/actions/setup.yaml | ||
- name: Check type | ||
run: pnpm typecheck | ||
env: | ||
CI: true | ||
|
||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
needs: | ||
- check_format | ||
- check_type | ||
steps: | ||
- name: Setup | ||
uses: ./.github/actions/setup.yaml | ||
- name: Build | ||
run: pnpm build | ||
env: | ||
CI: true | ||
- uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3 | ||
with: | ||
name: dist | ||
path: dist | ||
test: | ||
name: Test on node ${{ matrix.node-version }} and ${{ matrix.os }} | ||
needs: | ||
- check_format | ||
- check_type | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
node-version: [16.x, 18.x, 20.x, 22.x] | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
permissions: | ||
contents: read | ||
steps: | ||
- name: Setup | ||
uses: ./.github/actions/setup.yaml | ||
- name: Test | ||
run: pnpm test | ||
env: | ||
CI: true | ||
|
||
release: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
needs: | ||
- build | ||
- test | ||
# if repository is github.com/kamiazya/typedoc-plugin-mermaid | ||
# and branch is main | ||
# and before job is successful | ||
# then run this job | ||
if: ${{ github.repository == 'kamiazya/typedoc-plugin-mermaid' && github.ref == 'refs/heads/main' && github.event_name == 'push' && needs.build.result == 'success' && needs.test.result == 'success' }} | ||
permissions: | ||
contents: write # Used to commit to "Version Packages" PR | ||
pull-requests: write # Used to create "Version Packages" PR | ||
id-token: write # Used to publish to npm with provenance statements | ||
# Other permissions are defaulted to none | ||
steps: | ||
- name: Setup | ||
uses: ./.github/actions/setup.yaml | ||
- name: Create Release Pull Request or Publish to npm | ||
id: changesets | ||
uses: changesets/action@aba318e9165b45b7948c60273e0b72fce0a64eb9 # v1.4.7 | ||
with: | ||
publish: pnpm exec changeset publish | ||
version: pnpm exec changeset version | ||
createGithubReleases: true | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
outputs: | ||
published: ${{ steps.changesets.outputs.published }} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
20 |