Skip to content

Commit

Permalink
ci: Package server for release
Browse files Browse the repository at this point in the history
  • Loading branch information
shrink committed Nov 30, 2024
1 parent fe70461 commit 1267d92
Show file tree
Hide file tree
Showing 6 changed files with 888 additions and 8 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Create Release

on:
push:
# tags:
# - "v*"

permissions:
contents: write

jobs:
upload-build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "18"
- run: npm ci
- name: Build and package server
run: npm run package
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
file: builds/handles-server*
tag: test # TODO: Remove
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/node_modules
/dist
.vercel
/bin
/handles-server
/builds
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ values it has been configured with.

```shell
$ HANDLES_PROVIDER="map:alice.at.example.com->did:plc:example1,bob.at.example.com->did:plc:example2" \
npm run dev
./handles-server

[00:00:00.000] INFO (0000): Resolved configuration to provider 'map'
[00:00:00.000] DEBUG (0000): Successfully parsed a list of handles.
Expand Down Expand Up @@ -56,7 +56,7 @@ Environment Variable which contains the connection string or it can contain a
connection string itself.

```shell
$ HANDLES_PROVIDER="pg:DATABASE_URL" npm run dev
$ HANDLES_PROVIDER="pg:DATABASE_URL" ./handles-server
```

### Google Sheets
Expand Down
6 changes: 3 additions & 3 deletions logging.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import pino, { Logger } from "pino";

export const logger: Logger = ["production", "test"].includes(
process.env["NODE_ENV"] || "unknown",
)
const environment = process.env["NODE_ENV"] || "production";

export const logger: Logger = ["production", "test"].includes(environment)
? pino({ level: "warn" })
: pino({
transport: {
Expand Down
Loading

0 comments on commit 1267d92

Please sign in to comment.