Skip to content

Commit

Permalink
feat: sdk-react publishing pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
johnjcsmith committed Nov 11, 2024
1 parent 24a1b4d commit 28eda31
Show file tree
Hide file tree
Showing 6 changed files with 1,700 additions and 103 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ jobs:
filters: |
sdk_node:
- 'sdk-node/**'
sdk_react:
- 'sdk-react/**'
sdk_dotnet:
- 'sdk-dotnet/**'
sdk_go:
Expand Down Expand Up @@ -74,6 +76,45 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

publish-react:
needs: check_changes
if: ${{ needs.check_changes.outputs.sdk_react == 'true' }}
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
defaults:
run:
working-directory: sdk-react
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: "npm"
cache-dependency-path: sdk-react/package-lock.json
- name: Install dependencies
run: npm ci
- name: Build package
run: npm run build
- name: Configure Git User
run: |
git config --global user.name "Inferable CI"
git config --global user.email "[email protected]"
- name: Release It
run: |
npm config set //registry.npmjs.org/:_authToken $NPM_TOKEN
version=$(npx release-it --release-version)
npx release-it --npm.skipChecks --git.tagName=sdk-react/v${version} --no-github.release --git.commitMessage="Bump sdk-react version to ${version}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

publish-dotnet:
needs: check_changes
if: ${{ needs.check_changes.outputs.sdk_dotnet == 'true' }}
Expand Down
2 changes: 1 addition & 1 deletion sdk-react/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ await createMessage({

```

The hook automatically polls for updates to messages and run status at the specified interval.
The hook automatically polls for updates to messages and run state at the specified interval.

## Local Development

Expand Down
Loading

0 comments on commit 28eda31

Please sign in to comment.