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

Improve CD workflows #35

Merged
merged 2 commits into from
Nov 11, 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
77 changes: 77 additions & 0 deletions .github/workflows/cd.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: CD

on:
workflow_dispatch:
inputs:
tag:
description: 'NPM tag to use'
type: choice
required: true
options:
- next
- latest
client-wasm:
description: 'Publish @nillion/client-wasm'
type: boolean
default: false
client-vms:
description: 'Publish @nillion/client-vms'
type: boolean
default: false
client-react-hooks:
description: 'Publish @nillion/client-react-hooks'
type: boolean
default: false

concurrency:
group: "publish"
cancel-in-progress: true

jobs:
publish-client-wasm:
if: github.event.inputs.client-wasm == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "23"
registry-url: "https://registry.npmjs.org"
- uses: pnpm/action-setup@v4
- run: pnpm install
- run: pnpm --filter "@nillion/client-wasm" build
- env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: pnpm --filter "@nillion/client-wasm" publish --tag ${{ github.event.inputs.tag }} --no-git-tag-version

publish-client-vms:
if: github.event.inputs.client-vms == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "23"
registry-url: "https://registry.npmjs.org"
- uses: pnpm/action-setup@v4
- run: pnpm install
- run: pnpm --filter "@nillion/client-vms" build
- env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: pnpm --filter "@nillion/client-vms" publish --tag ${{ github.event.inputs.tag }} --no-git-tag-version

publish-client-react-hooks:
if: github.event.inputs.client-react-hooks == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "23"
registry-url: "https://registry.npmjs.org"
- uses: pnpm/action-setup@v4
- run: pnpm install
- run: pnpm --filter "@nillion/client-react-hooks" build
- env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: pnpm --filter "@nillion/client-react-hooks" publish --tag ${{ github.event.inputs.tag }} --no-git-tag-version
1 change: 0 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
pull_request:
branches:
- main
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down
30 changes: 0 additions & 30 deletions .github/workflows/publish.yaml

This file was deleted.

21 changes: 0 additions & 21 deletions client-react-hooks/LICENSE

This file was deleted.

21 changes: 0 additions & 21 deletions client-vms/LICENSE

This file was deleted.

201 changes: 0 additions & 201 deletions client-wasm/LICENSE

This file was deleted.

3 changes: 3 additions & 0 deletions client-wasm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,8 @@
"types": "./dist/index.d.ts"
}
},
"scripts": {
"build": "echo 'no op'; exit 0"
},
"files": ["dist", "commit-sha.txt", "package.json"]
}
Loading