Skip to content
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
23 changes: 23 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Publish to npm
on:
release:
types: [published]

permissions:
contents: read
id-token: write

jobs:
publish:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: 24
registry-url: https://registry.npmjs.org
- run: npm ci
- run: npm run check:ci
- run: npm run test:run
- run: npm publish --provenance --access public
24 changes: 24 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Create GitHub Release
on:
push:
tags:
- "v*"
workflow_dispatch:
inputs:
tag:
description: "Tag to release (for example: v1.2.3)"
required: true

permissions:
contents: write

jobs:
release:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Create release from tag
env:
GH_TOKEN: ${{ github.token }}
TAG_NAME: ${{ inputs.tag || github.ref_name }}
run: gh release create "$TAG_NAME" --generate-notes
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,6 @@ sosumi fetch https://developer.apple.com/documentation/swift/array --json
sosumi search "SwiftData" --json
```


### Chrome Extension

You can also use Sosumi from a community-contributed
Expand Down Expand Up @@ -263,6 +262,18 @@ be sure to re-run:
npm run cf-typegen
```

### Publishing

Publishing is handled by two GitHub Actions workflows:

- Release creation: `.github/workflows/release.yml`
- Trigger: pushed tags matching `v*` or manual dispatch with `tag`
- Command: `gh release create "$TAG_NAME" --generate-notes`
- npm publish: `.github/workflows/publish.yml`
- Trigger: GitHub Release published (`release.published`)
- Auth: npm trusted publishing via OIDC (`id-token: write`)
- Command: `npm publish --provenance --access public`

## License

This project is available under the MIT license.
Expand Down