Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[changesets] Update to use new changeset process #4857

Merged
merged 6 commits into from
Sep 29, 2022
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
2 changes: 1 addition & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
"linked": [],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"updateInternalDependencies": "minor",
"ignore": ["sui-explorer", "sui-wallet", "demo-nft-dapp", "sui-wallet-adapter"]
}
29 changes: 7 additions & 22 deletions .github/actions/pnpm-diffs/action.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,9 @@
name: Detect Changes in Pnpm Workspace
description: Defines variables indicating the parts of the pnpm workspace have changed
outputs:
isExplorerClient:
description: True when there are changes to files related to explorer client
value: "${{ steps.changes.outputs.explorer }}"
isTypeScriptSDK:
description: True when there are changes to files related to TypeScript SDK
value: "${{ steps.changes.outputs.sdk }}"
isWalletExt:
description: True when there are changes to files related to Wallet Extension
value: "${{ steps.changes.outputs.wallet }}"
isWalletAdapter:
description: True when there are changes to files related to wallet adapter
value: "${{ steps.changes.outputs.walletAdapter }}"
packages:
description: A list of packages that have changed.
value: ${{ steps.changes.outputs.packages }}
runs:
using: composite
steps:
Expand All @@ -22,16 +13,10 @@ runs:
- uses: pnpm/action-setup@v2.2.2
with:
version: 7
- name: Pnpm list
- id: changes
name: Detect changes
shell: bash
run: pnpm list --filter "...[origin/main]" --depth -1 --json > changes.json
run: echo "::set-output name=packages::$(pnpm list --filter "...[origin/main]" --depth -1 --json | jq -c "[.[] | .name]")"
- name: Print changes for easy debugging
shell: bash
run: cat ./changes.json
- id: changes
shell: bash
run: |
echo "::set-output name=explorer::$(jq 'any(.[]; .name == "sui-explorer")' changes.json)"
echo "::set-output name=sdk::$(jq 'any(.[]; .name == "@mysten/sui.js")' changes.json)"
echo "::set-output name=wallet::$(jq 'any(.[]; .name == "sui-wallet")' changes.json)"
echo "::set-output name=walletAdapter::$(jq 'any(.[]; .name | startswith("@mysten/wallet-adapter"))' changes.json)"
run: echo ${{ steps.changes.outputs.packages }}
6 changes: 3 additions & 3 deletions .github/workflows/changesets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ on:
concurrency: ${{ github.workflow }}-${{ github.ref }}

jobs:
snapshot:
release:
runs-on: ubuntu-latest
steps:
- name: Dispatch Snapshot To Operations
- name: Dispatch Changesets To Operations
uses: peter-evans/repository-dispatch@v2
with:
repository: MystenLabs/sui-operations
token: ${{ secrets.CHANGESETS_DEPLOY_DISPATCH }}
event-type: changesets-snapshot
event-type: changesets
client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}"}'

version:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/explorer-client-prs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ jobs:
diff:
runs-on: [ubuntu-latest]
outputs:
isClient: ${{ steps.diff.outputs.isExplorerClient }}
isClient: ${{ contains(fromJson(steps.diff.outputs.packages), 'sui-explorer') }}
steps:
- uses: actions/checkout@v3
- name: Detect Changes
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ts-sdk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ jobs:
diff:
runs-on: [ubuntu-latest]
outputs:
isTypescriptSDK: ${{ steps.diff.outputs.isTypescriptSDK }}
isTypescriptSDK: ${{ contains(fromJson(steps.diff.outputs.packages), '@mysten/sui.js') }}
steps:
- uses: actions/checkout@v3
- name: Detect Changes
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/wallet-adapter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ jobs:
diff:
runs-on: [ubuntu-latest]
outputs:
isWalletAdapter: ${{ steps.diff.outputs.isWalletAdapter }}
isWalletAdapter: ${{ contains(fromJson(steps.diff.outputs.packages), 'sui-wallet-adapter') }}
steps:
- uses: actions/checkout@v3
- name: Detect Changes
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/wallet-ext-prs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ jobs:
diff:
runs-on: ubuntu-latest
outputs:
isWalletExt: ${{ steps.diff.outputs.isWalletExt }}
isWalletExt: ${{ contains(fromJson(steps.diff.outputs.packages), 'sui-wallet') }}
steps:
- uses: actions/checkout@v3
- name: Detect Changes
Expand Down