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

feat: add CI #6

Merged
merged 10 commits into from
Feb 1, 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
25 changes: 25 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: CI
on:
push:
branches: ['main']
pull_request:
branches: ['main']
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 20.11.0
- uses: pnpm/action-setup@v2
with:
version: 8.15.1
- name: Install Depdendencies
run: pnpm install
- name: Build and run tests for pnpm-sync-lib
run: pnpm --filter pnpm-sync-lib run build && pnpm --filter pnpm-sync-lib run test
- name: Build and run tests for pnpm-sync
run: pnpm --filter pnpm-sync run build && pnpm --filter pnpm-sync run test
27 changes: 27 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Publish Packages
on:
push:
branches: ['main']
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 20.11.0
- uses: pnpm/action-setup@v2
with:
version: 8.15.1
- name: Install Depdendencies
run: pnpm install
- name: Build and run tests for pnpm-sync-lib
run: pnpm --filter pnpm-sync-lib run build && pnpm --filter pnpm-sync-lib run test
- name: Build and run tests for pnpm-sync
run: pnpm --filter pnpm-sync run build && pnpm --filter pnpm-sync run test
- name: Publish to NPM
run: pnpm --filter pnpm-sync publish && pnpm --filter pnpm-sync-lib publish
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
2 changes: 2 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ hoist-pattern=
public-hoist-pattern=
# Turn off the auto-install-peers as it is on by default in pnpm@8x
auto-install-peers=false
# If the user set a version for workspace dependency, do not link it to local
link-workspace-packages=false
3 changes: 1 addition & 2 deletions packages/pnpm-sync-lib/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pnpm-sync-lib",
"version": "0.0.2",
"version": "0.1.0",
"description": "API library for integrating \"pnpm-sync\" with your toolchain",
"repository": {
"type": "git",
Expand All @@ -18,7 +18,6 @@
"dependencies": {
"@rushstack/node-core-library": "^3.61.0",
"@rushstack/package-extractor": "^0.6.12",
"@microsoft/rush-lib": "~5.110.1",
"@pnpm/lockfile-file": "~8.1.4",
"@pnpm/logger": "~5.0.0"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/pnpm-sync/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pnpm-sync",
"version": "0.0.7",
"version": "0.1.0",
"description": "Recopy injected dependencies whenever a project is rebuilt in your PNPM workspace",
"keywords": [
"rush",
Expand Down Expand Up @@ -37,7 +37,7 @@
},
"dependencies": {
"commander": "^11.1.0",
"pnpm-sync-lib": "0.0.2"
"pnpm-sync-lib": "0.1.0"
},
"devDependencies": {
"@rushstack/eslint-config": "^3.6.2",
Expand Down
Loading
Loading