Skip to content

Commit

Permalink
chore: add ci release
Browse files Browse the repository at this point in the history
  • Loading branch information
nikgraf committed Jan 30, 2024
1 parent c5916d3 commit 5bf4162
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 14 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Release

on: workflow_dispatch

concurrency: ${{ github.workflow }}-${{ github.ref }}

jobs:
release:
timeout-minutes: 15
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: install wasm-bindgen-cli
run: cargo install wasm-bindgen-cli
- name: install wasm-unknown-unknown target
run: rustup target add wasm32-unknown-unknown
- uses: pnpm/action-setup@v2
with:
version: 8
- name: install dependencies
run: pnpm install
- name: install dependencies
run: pnpm install
- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
publish: pnpm publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,5 @@ pnpm test:e2e
To publish the packages (opaque and opaque-p256) you can run

```sh
pnpm publish:all
pnpm publish
```
4 changes: 1 addition & 3 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@

## Supported Versions

| Version | Supported |
| ------- | ------------------ |
| 0.8.0 | :white_check_mark: |
The most resent version of the library is supported.

## Reporting a Vulnerability

Expand Down
9 changes: 7 additions & 2 deletions bin/build.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
const sh = require("shelljs");
const path = require("path");

// throw if a command fails
sh.config.fatal = true;

const rootPkg = JSON.parse(sh.cat("package.json").toString());
const ristrettoPackageJson = JSON.parse(
sh
.cat(path.join(__dirname, "..", "build", "ristretto", "package.json"))
.toString(),
);

const packageJson = function (name) {
return new sh.ShellString(`{
Expand All @@ -13,7 +18,7 @@ const packageJson = function (name) {
"Stefan Oestreicher <[email protected]>",
"Nik Graf <[email protected]>"
],
"version": "${rootPkg.version}",
"version": "${ristrettoPackageJson.version}",
"license": "MIT",
"files": [
"index.d.ts",
Expand Down
10 changes: 2 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"name": "opaque-monorepo",
"version": "0.8.0",
"license": "MIT",
"private": true,
"devDependencies": {
Expand Down Expand Up @@ -34,14 +33,9 @@
"test:p256": "cross-env OPAQUE_BUILD=p256 jest",
"test:ristretto": "jest",
"test": "pnpm test:p256 && pnpm test:ristretto",
"publish:ristretto": "cd build/ristretto && pnpm publish",
"publish:p256": "cd build/p256 && pnpm publish",
"publish:all": "pnpm publish:ristretto && pnpm publish:p256",
"publish": "pnpm build && pnpm changeset publish",
"typecheck": "tsc --noEmit && pnpm typecheck:fullstack-simple-nextjs && pnpm typecheck:fullstack-e2e-encrypted-locker-nextjs",
"typecheck:fullstack-simple-nextjs": "cd examples/fullstack-simple-nextjs && tsc --noEmit",
"typecheck:fullstack-e2e-encrypted-locker-nextjs": "cd examples/fullstack-e2e-encrypted-locker-nextjs && tsc --noEmit",
"changeset": "changeset",
"publish:packages": "changeset publish",
"version:packages": "changeset version"
"typecheck:fullstack-e2e-encrypted-locker-nextjs": "cd examples/fullstack-e2e-encrypted-locker-nextjs && tsc --noEmit"
}
}

0 comments on commit 5bf4162

Please sign in to comment.