-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: sdk-react publishing pipeline (#83)
- Loading branch information
1 parent
c62f08b
commit 328cd92
Showing
5 changed files
with
1,698 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,7 @@ jobs: | |
if: ${{ github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.head_branch == 'main' }} | ||
outputs: | ||
sdk_node: ${{ steps.filter.outputs.sdk_node }} | ||
sdk_react: ${{ steps.filter.outputs.sdk_react }} | ||
sdk_dotnet: ${{ steps.filter.outputs.sdk_dotnet }} | ||
sdk_go: ${{ steps.filter.outputs.sdk_go }} | ||
steps: | ||
|
@@ -30,6 +31,8 @@ jobs: | |
filters: | | ||
sdk_node: | ||
- 'sdk-node/**' | ||
sdk_react: | ||
- 'sdk-react/**' | ||
sdk_dotnet: | ||
- 'sdk-dotnet/**' | ||
sdk_go: | ||
|
@@ -74,6 +77,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' }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.