Skip to content

Commit 3a199bf

Browse files
Added pnpm to build and turborepo to publish packages
1 parent 4771c86 commit 3a199bf

File tree

4 files changed

+18
-13
lines changed

4 files changed

+18
-13
lines changed

.github/workflows/publish.yaml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,29 +9,28 @@ jobs:
99
runs-on: ubuntu-latest
1010
timeout-minutes: 30
1111
steps:
12-
# Checkout repository under $GITHUB_WORKSPACE path
13-
- name: Repository checkout
12+
- name: Checkout code
1413
uses: actions/checkout@v4
1514

16-
- name: Docker login
15+
- name: Docker login (opcional si la imagen está en DockerHub privado)
1716
uses: docker/login-action@v3
1817
with:
1918
username: ${{ secrets.DOCKER_USERNAME }}
2019
password: ${{ secrets.DOCKER_PUSH_TOKEN }}
2120

22-
- name: Pull image
21+
- name: Pull built image
2322
run: |
2423
docker pull ${{ secrets.DOCKER_USERNAME }}/${{ github.event.repository.name }}-base:${{ github.sha }}
2524
26-
- name: Run publish inside Docker
25+
- name: Run turbo publish inside Docker
2726
run: |
2827
docker run --rm \
2928
-e NPM_TOKEN=${{ secrets.NPM_TOKEN }} \
3029
-v ${{ github.workspace }}:/app \
3130
-w /app \
3231
${{ secrets.DOCKER_USERNAME }}/${{ github.event.repository.name }}-base:${{ github.sha }} \
33-
bash -c "
34-
echo '//registry.npmjs.org/:_authToken='\"\$NPM_TOKEN\" > ~/.npmrc && \
35-
cd packages/dapp/browser && npm install && npm publish --access public && \
36-
cd /app/packages/wallet/vanilla && npm install && npm publish --access public
37-
"
32+
bash -c '
33+
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc &&
34+
pnpm install &&
35+
pnpm turbo run publish
36+
'

packages/dapp/browser/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
"clean": "rimraf .turbo dist node_modules",
77
"check-types": "npx tsc --noEmit",
88
"lint": "eslint .",
9-
"test": "jest"
9+
"test": "jest",
10+
"publish": "pnpm publish --access public"
1011
},
1112
"author": "Peersyst",
1213
"dependencies": {

packages/wallet/vanilla/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
"clean": "rimraf .turbo dist node_modules",
77
"check-types": "npx tsc --noEmit",
88
"lint": "eslint .",
9-
"test": "jest --passWithNoTests"
9+
"test": "jest --passWithNoTests",
10+
"publish": "pnpm publish --access public"
1011
},
1112
"author": "Peersyst",
1213
"dependencies": {

turbo.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@
2828
"bundle": {
2929
"dependsOn": ["^bundle"],
3030
"outputs": ["dist/**"]
31-
}
31+
},
32+
"publish": {
33+
"dependsOn": ["^publish"],
34+
"outputs": []
35+
}
3236
}
3337
}

0 commit comments

Comments
 (0)