-
Notifications
You must be signed in to change notification settings - Fork 531
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(ci): abstract away install bs (#674)
* refactor(ci): abstract away install bs * feat(action.yaml): add GitHub Action workflow to install repository dependencies This commit adds a new GitHub Action workflow file, `action.yaml`, which is responsible for installing the repository dependencies. The workflow consists of the following steps: 1. Setup Node: This step sets up the Node.js environment using the `actions/setup-node` action, with the specified Node version as `lts/*`. 2. Setup pnpm: This step uses the `pnpm/action-setup` action to set up pnpm, the package manager, with the latest version. The `run_install` option is set to `false` to skip the installation step. 3. Get pnpm store directory: This step retrieves the path to the pnpm store directory and stores it in the `STORE_PATH` variable. 4. Setup pnpm cache: This step uses the `actions/cache` action to cache the pnpm store directory. The cache key is generated based on the operating system and the hash of the * chore(action.yaml): change shell to bash for installing dependencies * chore(action.yaml): update pnpm/action-setup version to v2.4.0 * chore(action.yaml): add description to the action.yaml file * chore(ci.yaml): remove unused steps in the CI workflow chore(ci.yaml): update test step to use 'pnpm turbo run test' command * chore(pnpm): add bun and wrangler as global dependencies chore(ci): remove empty line in build_packages job fix(deploy-api): remove 'npx' prefix from wrangler deploy command chore(semantic-pull-requests): rename workflow to "Lint PR title" * test: fix failing unit tests * fix(action.yaml): add --recursive flag to pnpm install command chore(action.yaml): install bun and wrangler globally * chore(hono): update "@unkey/api" dependency to version "^0.13.1" * chore(ci.yaml): update test job to build specific packages The test job in the ci.yaml file has been updated to build specific packages based on the matrix configuration. This change allows for more granular testing of individual packages within the project. * chore(ci.yaml): rename build job to test job chore(ci.yaml): add build and test steps to the test job chore(hono): update @unkey/api dependency to workspace version * chore(ci.yaml): remove "api" from the list of jobs * fix(ci.yaml): fix typo in package name, change "@unkey/key" to "@unkey/keys"
- Loading branch information
Showing
9 changed files
with
155 additions
and
251 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,37 @@ | ||
name: Install Repo | ||
description: Install the ts toolchain and dependencies | ||
|
||
runs: | ||
using: "composite" | ||
|
||
steps: | ||
- name: Setup Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: lts/* | ||
|
||
- uses: pnpm/[email protected] | ||
with: | ||
version: latest | ||
run_install: false | ||
|
||
- name: Get pnpm store directory | ||
id: pnpm-cache | ||
shell: bash | ||
run: | | ||
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT | ||
- uses: actions/cache@v3 | ||
name: Setup pnpm cache | ||
with: | ||
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }} | ||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
restore-keys: | | ||
${{ runner.os }}-pnpm-store- | ||
- name: Install dependencies | ||
shell: bash | ||
run: | | ||
pnpm install --recursive | ||
npm i -g bun | ||
npm i -g wrangler |
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 |
---|---|---|
|
@@ -16,23 +16,12 @@ jobs: | |
- name: Checkout Repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: Use PNPM | ||
uses: pnpm/[email protected] | ||
with: | ||
version: latest | ||
|
||
- name: Use Node.js 20 | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 20 | ||
cache: "pnpm" | ||
|
||
- name: Install | ||
run: pnpm install | ||
uses: ./.github/actions/pnpm | ||
|
||
- name: Build packages | ||
run: pnpm turbo run build --filter='./packages/*' | ||
run: pnpm turbo run build --filter='./packages/*' | ||
|
||
- name: Create Version PR or Publish to NPM | ||
id: changesets | ||
uses: changesets/[email protected] | ||
|
@@ -43,4 +32,4 @@ jobs: | |
publish: pnpm changeset publish | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |
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
Oops, something went wrong.