-
-
Notifications
You must be signed in to change notification settings - Fork 370
feat: tolgee platform client #3201
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
stepan662
wants to merge
11
commits into
main
Choose a base branch
from
stepangranat/tolgee-client-lib
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
07ce78e
feat: tolgee platform client
JanCizmar 0ce5cdc
chore: switch client publish to npm trusted publishing (OIDC)
JanCizmar 630a83e
chore: bump publish workflow Node to 24 for npm trusted publishing
JanCizmar 8d48bf2
chore: add repository, homepage, bugs, license to client package.json
JanCizmar 21d7d75
feat: typed webhooks via OpenAPI 3.1 webhooks section
JanCizmar c8329b5
test: webhook payload contract tests across representative shape cate…
JanCizmar 4ca8a9a
docs(client): document the webhooks namespace for receiver typing
JanCizmar dbb65cd
chore: regenerate webapp API schema for typed webhooks
dkrizan 70be7fb
Merge remote-tracking branch 'origin/main' into stepangranat/tolgee-c…
dkrizan b2f8420
style: apply ktlint formatting to webhook OpenAPI code
dkrizan 2342cb6
chore: regenerate webapp API schema after merging main
dkrizan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,93 @@ | ||
| name: Publish client | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| workflow_run: | ||
| workflows: ["Release"] | ||
| branches: ["main"] | ||
| types: | ||
| - completed | ||
| pull_request: | ||
|
|
||
| # Trusted Publishers for npm via GitHub Actions OIDC | ||
| permissions: | ||
| id-token: write | ||
| contents: read | ||
|
|
||
| jobs: | ||
| publish-client: | ||
| runs-on: ubuntu-24.04 | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| token: "${{ secrets.TOLGEE_MACHINE_PAT }}" | ||
|
|
||
| - name: Setup node | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: "24" | ||
| registry-url: "https://registry.npmjs.org" | ||
|
|
||
| - name: Install node modules | ||
| run: npm ci | ||
|
|
||
| - name: Run get new version | ||
| run: npm run release-dry | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| GIT_AUTHOR_NAME: Tolgee Machine | ||
| GIT_COMMITTER_NAME: Tolgee Machine | ||
| GIT_AUTHOR_EMAIL: machine@tolgee.io | ||
| GIT_COMMITTER_EMAIL: machine@tolgee.io | ||
|
|
||
| - name: Set version property | ||
| id: version | ||
| run: echo "VERSION=$(test -e .VERSION && echo v$(cat .VERSION))" >> $GITHUB_OUTPUT | ||
|
|
||
| - name: Start backend server | ||
| uses: nick-fields/retry@v2 | ||
| with: | ||
| timeout_minutes: 30 | ||
| max_attempts: ${{ github.event_name == 'push' && 5 || 1 }} | ||
| command: | | ||
| ./gradlew runDockerE2e -x buildWebapp | ||
|
|
||
| # client folder | ||
| - name: install npm dependencies | ||
| run: npm install | ||
| working-directory: ./client | ||
|
|
||
| - name: Pull newest schema | ||
| run: npm run schema | ||
| working-directory: ./client | ||
| env: | ||
| TOLGEE_API_PORT: "8201" | ||
|
|
||
| - name: Publish to latest tag | ||
| if: steps.version.outputs.VERSION != '' | ||
| run: | | ||
| VERSION=${{ steps.version.outputs.VERSION }} | ||
| VERSION=${VERSION#v} # Remove 'v' prefix | ||
| if npm view @tginternal/client@$VERSION version >/dev/null 2>&1; then | ||
| echo "Version $VERSION already exists, skipping publish." | ||
| else | ||
| npm run update-version -- $VERSION | ||
| npm run build | ||
| npm run test | ||
| npm publish --tag latest --provenance | ||
| fi | ||
| working-directory: ./client | ||
|
stepan662 marked this conversation as resolved.
|
||
|
|
||
| - name: Publish to prerelease tag | ||
| if: steps.version.outputs.VERSION == '' | ||
| run: | | ||
| VERSION=0.0.0-prerelease.$(git rev-parse --short HEAD) | ||
| if npm view @tginternal/client@$VERSION version >/dev/null 2>&1; then | ||
| echo "Version $VERSION already exists, skipping publish." | ||
| else | ||
| npm run update-version -- $VERSION | ||
| npm run build | ||
| npm run test | ||
| npm publish --tag prerelease --provenance | ||
| fi | ||
| working-directory: ./client | ||
|
stepan662 marked this conversation as resolved.
|
||
This file contains hidden or 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
This file contains hidden or 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.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.