-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
d759c69
commit 2b1c048
Showing
7 changed files
with
112 additions
and
72 deletions.
There are no files selected for viewing
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,31 @@ | ||
name: Compare Version | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
package_path: | ||
required: true | ||
type: string | ||
outputs: | ||
has_changed: | ||
description: Indicates whether the version has changed | ||
value: ${{ jobs.compare-version.outputs.has_changed }} | ||
|
||
jobs: | ||
compare-version: | ||
name: Check Version | ||
runs-on: ubuntu-latest | ||
outputs: | ||
has_changed: ${{ steps.version_check.outputs.has_changed }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 2 | ||
|
||
- name: Check package.json version | ||
uses: hugorcd/[email protected] | ||
id: version_check | ||
with: | ||
path: ${{ inputs.package_path }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
26 changes: 14 additions & 12 deletions
26
.github/workflows/demo.yml → .github/workflows/deploy-demo.yml
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
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
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,55 @@ | ||
name: Deploy packages | ||
|
||
on: | ||
push: | ||
branches: ['master'] | ||
|
||
jobs: | ||
validation: | ||
name: Validation | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ./.github/actions/setup-node | ||
- uses: ./.github/actions/install-npm-deps | ||
|
||
- name: Build package | ||
run: npm run build | ||
|
||
|
||
deploy-extension: | ||
needs: validation | ||
name: Deploy @msw-devtools/extension | ||
uses: ./.github/workflows/deploy-extension.yml | ||
|
||
deploy-demo: | ||
needs: validation | ||
name: Deploy @msw-devtools/demo | ||
uses: ./.github/workflows/deploy-demo.yml | ||
|
||
changesets: | ||
name: Deploy @msw-devtools/connect | ||
needs: validation | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commit | ||
fetch-depth: 0 | ||
|
||
- uses: ./.github/actions/setup-node | ||
- uses: ./.github/actions/install-npm-deps | ||
|
||
- name: Build package | ||
env: | ||
PUBLIC_PATH: /msw-devtools-extension/ | ||
run: npm run build -- --filter=@msw-devtools/connect | ||
|
||
- name: Publish | ||
uses: changesets/action@master | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} |
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