Skip to content

Commit

Permalink
Use npm workspaces
Browse files Browse the repository at this point in the history
  • Loading branch information
nad-au committed Feb 5, 2024
1 parent b945cd8 commit 825dabf
Show file tree
Hide file tree
Showing 44 changed files with 5,481 additions and 10,325 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/actionstep-auth-function-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ name: ActionStep Auth Function CI
on:
push:
branches: ["**"]
paths: "actionstep-auth-function/**"
paths: "monorepo/actionstep-auth-function/**"
pull_request:
branches: [main]
paths: "actionstep-auth-function/**"
paths: "monorepo/actionstep-auth-function/**"

defaults:
run:
working-directory: ./actionstep-auth-function
working-directory: ./monorepo
shell: bash

jobs:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/actionstep-client-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ name: ActionStep Client CI
on:
push:
branches: ["**"]
paths: "actionstep-client/**"
paths: "monorepo/actionstep-client/**"
pull_request:
branches: [main]
paths: "actionstep-client/**"
paths: "monorepo/actionstep-client/**"

defaults:
run:
working-directory: ./actionstep-client
working-directory: ./monorepo
shell: bash

jobs:
Expand Down
25 changes: 5 additions & 20 deletions .github/workflows/actionstep-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ on:

jobs:

actionstep-client-publish:
publish-packages:
defaults:
run:
working-directory: ./actionstep-client
working-directory: ./monorepo
shell: bash
runs-on: ubuntu-latest
steps:
Expand All @@ -21,24 +21,9 @@ jobs:
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: npm run build
- run: npm publish
- run: npm publish -w actionstep-client
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

actionstep-auth-function-publish:
defaults:
run:
working-directory: ./actionstep-auth-function
shell: bash
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: npm run build
- run: npm publish
- run: npm publish -w actionstep-auth-function
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
42 changes: 42 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,44 @@
# actionstep

ActionStep API Client

## Getting started

1. Install or update [nvm](https://github.com/nvm-sh/nvm#installing-and-updating)
> nvm is a version manager for node.js, designed to be installed per-user, and invoked per-shell. nvm works on any POSIX-compliant shell (sh, dash, ksh, zsh, bash), in particular on these platforms: unix, macOS, and windows WSL.
2. Open the shell and change to the `monorepo` workspace root directory.
```sh
cd monorepo
```

3. Install and activate the indicated Node.js version in `.nvmrc`
```sh
nvm install
```

4. Switch to the Node.js version specified in `.nvmrc` in the current shell. You should run this every time you open a new shell.
```sh
nvm use
node -v
```

5. To avoid running `nvm use` for each shell, you can set the system default Node.js version as indicated in the `.nvmrc`. Run the following and restart your shell
```sh
nvm alias default "$(<.nvmrc)"
```

8. Install packages
```sh
npm install
```

9. Build
```sh
npm run build
```

10. To run the unit tests
```sh
npm test
```
Loading

0 comments on commit 825dabf

Please sign in to comment.