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

Add preview publishing #151

Merged
merged 21 commits into from
Oct 25, 2024
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
68 changes: 51 additions & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
name: CI

on:
push:
branches: ["master"]
pull_request:
branches: ["master"]
push:
branches:
- "master"
tags:
- "!**"

concurrency:
group: ci-${{ github.event.pull_request.number || github.ref }}
Expand All @@ -16,13 +18,13 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v2
- uses: pnpm/action-setup@v4
with:
version: 9

- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 20
cache: "pnpm"
Expand All @@ -34,13 +36,13 @@ jobs:
name: Format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v2
- uses: pnpm/action-setup@v4
with:
version: 9

- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 20
cache: "pnpm"
Expand All @@ -57,14 +59,14 @@ jobs:
matrix:
node-version: [18, 20]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v2
- uses: pnpm/action-setup@v4
with:
version: 9

- name: Build and test using Node.js v${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "pnpm"
Expand All @@ -82,9 +84,9 @@ jobs:
matrix:
bun-version: ["latest"]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v2
- uses: pnpm/action-setup@v4
with:
version: 9

Expand All @@ -104,14 +106,14 @@ jobs:
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v2
- uses: pnpm/action-setup@v4
with:
version: 9

- name: Build using Node.js v20
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 20
cache: "pnpm"
Expand All @@ -124,3 +126,35 @@ jobs:

- name: Test using edge-runtime
run: pnpm run test:unit-edge

publish-preview:
name: "Publish preview"
runs-on: ubuntu-latest
needs: build-and-test-node
if: success()
timeout-minutes: 20
strategy:
fail-fast: false
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9

- name: Enable corepack
uses: actions/setup-node@v4
with:
node-version: 20
cache: "pnpm"

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Build
run: pnpm -r build

- name: Publish
run: pnpx pkg-pr-new publish './packages/*' './plugins/*' --no-template --pnpm --compact
16 changes: 9 additions & 7 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,26 @@
name: Coverage

on:
push:
branches: ["master"]
pull_request:
branches: ["master"]
push:
branches:
- "master"
tags:
- "!**"

jobs:
coverage:
name: Check and submit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v2
- uses: pnpm/action-setup@v4
with:
version: 9

- name: Collect coverage
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 20
cache: "pnpm"
Expand All @@ -28,7 +30,7 @@ jobs:

- name: Submit report
if: success() || failure()
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage/coverage-final.json
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ jobs:

steps:
- name: Checkout Repo
uses: actions/checkout@v3
uses: actions/checkout@v4

- uses: pnpm/action-setup@v2
- uses: pnpm/action-setup@v4
with:
version: 9

- name: Setup Node.js 20.x
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 20
cache: "pnpm"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"private": "true",
"repository": "fleet-sdk/fleet",
"repository": "github:fleet-sdk/fleet",
"license": "MIT",
"type": "module",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion packages/blockchain-providers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
}
},
"sideEffects": false,
"repository": "fleet-sdk/fleet",
"repository": "github:fleet-sdk/fleet",
"license": "MIT",
"publishConfig": {
"access": "public",
Expand Down
2 changes: 1 addition & 1 deletion packages/common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
}
},
"sideEffects": false,
"repository": "fleet-sdk/fleet",
"repository": "github:fleet-sdk/fleet",
"license": "MIT",
"publishConfig": {
"access": "public",
Expand Down
2 changes: 1 addition & 1 deletion packages/compiler/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
}
},
"sideEffects": false,
"repository": "fleet-sdk/fleet",
"repository": "github:fleet-sdk/fleet",
"license": "MIT",
"publishConfig": {
"access": "public",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
}
},
"sideEffects": false,
"repository": "fleet-sdk/fleet",
"repository": "github:fleet-sdk/fleet",
"license": "MIT",
"publishConfig": {
"access": "public",
Expand Down
2 changes: 1 addition & 1 deletion packages/crypto/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
}
},
"sideEffects": false,
"repository": "fleet-sdk/fleet",
"repository": "github:fleet-sdk/fleet",
"license": "MIT",
"publishConfig": {
"access": "public",
Expand Down
2 changes: 1 addition & 1 deletion packages/mock-chain/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
}
},
"sideEffects": false,
"repository": "fleet-sdk/fleet",
"repository": "github:fleet-sdk/fleet",
"license": "MIT",
"publishConfig": {
"access": "public",
Expand Down
2 changes: 1 addition & 1 deletion packages/serializer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
}
},
"sideEffects": false,
"repository": "fleet-sdk/fleet",
"repository": "github:fleet-sdk/fleet",
"license": "MIT",
"publishConfig": {
"access": "public",
Expand Down
2 changes: 1 addition & 1 deletion packages/wallet/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
}
},
"sideEffects": false,
"repository": "fleet-sdk/fleet",
"repository": "github:fleet-sdk/fleet",
"license": "MIT",
"publishConfig": {
"access": "public",
Expand Down
2 changes: 1 addition & 1 deletion plugins/ageusd/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
}
},
"sideEffects": false,
"repository": "fleet-sdk/fleet",
"repository": "github:fleet-sdk/fleet",
"license": "MIT",
"publishConfig": {
"access": "public",
Expand Down
2 changes: 1 addition & 1 deletion plugins/babel-fees/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
}
},
"sideEffects": false,
"repository": "fleet-sdk/fleet",
"repository": "github:fleet-sdk/fleet",
"license": "MIT",
"publishConfig": {
"access": "public",
Expand Down