Skip to content

Commit

Permalink
Merge pull request #377 from dajiaji/refine-publish-yml
Browse files Browse the repository at this point in the history
Add needs for npm publish.
  • Loading branch information
dajiaji authored Sep 1, 2024
2 parents 092b7ad + c5ba574 commit ec56c0d
Showing 1 changed file with 17 additions and 16 deletions.
33 changes: 17 additions & 16 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://registry.npmjs.org/
- uses: denoland/setup-deno@v1
with:
deno-version: v1.x
- name: Run dnt
run: |
npm install -g esbuild
deno task dnt
deno task test
- name: Run deno publish
run: deno publish
run: npx jsr publish

publish-core:
runs-on: ubuntu-latest
Expand All @@ -45,8 +40,9 @@ jobs:
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

publish-dhkem-x25519:
publish-chacha20poly1305:
runs-on: ubuntu-latest
needs: publish-core
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
Expand All @@ -57,18 +53,19 @@ jobs:
with:
deno-version: v1.x
- name: Run dnt
working-directory: ./x/dhkem-x25519
working-directory: ./x/chacha20poly1305
run: |
npm install -g esbuild
deno task dnt
- name: Publish to npm
working-directory: ./npm-packages/x/dhkem-x25519
working-directory: ./npm-packages/x/chacha20poly1305
run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

publish-dhkem-x448:
publish-dhkem-x25519:
runs-on: ubuntu-latest
needs: publish-core
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
Expand All @@ -79,18 +76,19 @@ jobs:
with:
deno-version: v1.x
- name: Run dnt
working-directory: ./x/dhkem-x448
working-directory: ./x/dhkem-x25519
run: |
npm install -g esbuild
deno task dnt
- name: Publish to npm
working-directory: ./npm-packages/x/dhkem-x448
working-directory: ./npm-packages/x/dhkem-x25519
run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

publish-chacha20poly1305:
publish-dhkem-x448:
runs-on: ubuntu-latest
needs: publish-core
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
Expand All @@ -101,18 +99,19 @@ jobs:
with:
deno-version: v1.x
- name: Run dnt
working-directory: ./x/chacha20poly1305
working-directory: ./x/dhkem-x448
run: |
npm install -g esbuild
deno task dnt
- name: Publish to npm
working-directory: ./npm-packages/x/chacha20poly1305
working-directory: ./npm-packages/x/dhkem-x448
run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

publish-hybridkem-x25519-kyber768:
runs-on: ubuntu-latest
needs: publish-dhkem-x25519
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
Expand All @@ -135,6 +134,7 @@ jobs:

publish-dhkem-secp256k1:
runs-on: ubuntu-latest
needs: publish-dhkem-x25519
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
Expand All @@ -157,6 +157,7 @@ jobs:

publish-hpke-js:
runs-on: ubuntu-latest
needs: [publish-chacha20poly1305, publish-dhkem-x25519, publish-dhkem-x448]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
Expand Down

0 comments on commit ec56c0d

Please sign in to comment.