Skip to content

Commit dd27158

Browse files
committed
Publish
1 parent 79101f6 commit dd27158

2 files changed

Lines changed: 19 additions & 14 deletions

File tree

.github/workflows/publish.yml

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Publish Package
1+
name: Publish
22

33
on:
44
workflow_dispatch:
@@ -8,29 +8,34 @@ on:
88
required: false
99

1010
permissions:
11-
id-token: write # Required for OIDC
11+
id-token: write # Required for OIDC
1212
contents: read
1313

1414
jobs:
1515
publish:
1616
runs-on: ubuntu-latest
17+
1718
steps:
19+
# Checkout repository
1820
- uses: actions/checkout@v4
19-
20-
# Setup Deno
21-
- uses: denoland/setup-deno@v2
2221
with:
23-
deno-version: v2.5
22+
ref: main
2423

25-
# Setup Node
26-
- uses: actions/setup-node@v4
24+
# Setup Node.js with OIDC Trusted Publishing
25+
- uses: actions/setup-node@v5
2726
with:
2827
node-version: '20'
2928
registry-url: 'https://registry.npmjs.org'
29+
always-auth: true
30+
31+
# Setup Deno
32+
- uses: denoland/setup-deno@v2
33+
with:
34+
deno-version: v2.5
3035

31-
# Ensure npm 11.5.1 or later is installed
32-
- name: Update npm
33-
run: npm install -g npm@latest
36+
- name: Build
37+
run: deno task build
3438

35-
- name: whoami
36-
run: npm whoami
39+
# Publish
40+
- name: Publish
41+
run: deno task publish

tasks.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const BuildPackage = (target: string = `target/build`) => Task.build.esm('src',
3535
// ------------------------------------------------------------------
3636
const PublishPackage = async (target: string = `target/build`) => {
3737
const { version } = JSON.parse(await Task.file(`${target}/package.json`).read())
38-
await Task.shell('npm whoami', version)
38+
console.log(version)
3939
// await Task.shell(`cd ${target} && npm publish typebox-${version}.tgz --access=public`)
4040
// await Task.shell(`git tag ${version}`)
4141
// await Task.shell(`git push origin ${version}`)

0 commit comments

Comments
 (0)