Skip to content

Commit cf76789

Browse files
author
Enrique A.
committed
Add NPM deployment github action
1 parent b863d6c commit cf76789

3 files changed

Lines changed: 47 additions & 34 deletions

File tree

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Publish Package to npm
2+
on:
3+
workflow_dispatch:
4+
5+
release:
6+
types:
7+
- published
8+
9+
jobs:
10+
build_and_deploy:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- uses: actions/setup-node@v3
16+
with:
17+
node-version: '20.11.0'
18+
registry-url: 'https://registry.npmjs.org'
19+
20+
- run: npm -g i deno pnpm
21+
22+
- run: deno task build-npm
23+
working-directory: src
24+
25+
- run: npm publish
26+
working-directory: src/dist
27+
env:
28+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

src/build_npm.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ await emptyDir("./dist");
55

66
await build({
77
esModule: true,
8-
scriptModule: false,
98
packageManager: "pnpm",
109
entryPoints: [
1110
"./mod.ts",
@@ -79,7 +78,7 @@ await build({
7978
deno: false,
8079
},
8180
package: {
82-
name: denoFile.name,
81+
name: denoFile.name.replace("@creit-tech", "@creit.tech"),
8382
version: denoFile.version,
8483
description: "A kit to handle all Stellar Wallets at once",
8584
author: {
@@ -100,6 +99,10 @@ await build({
10099
"xBull Wallet",
101100
"Rabet",
102101
"Freighter",
102+
"Wallet Connect",
103+
"Hana",
104+
"Ledger",
105+
"Trezor",
103106
],
104107
},
105108
});

src/deno.lock

Lines changed: 14 additions & 32 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)