-
Notifications
You must be signed in to change notification settings - Fork 71
Feat/i18n support #146
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
oscar24357
wants to merge
6
commits into
ToluLabs:main
Choose a base branch
from
oscar24357:feat/i18n-support
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
Feat/i18n support #146
Changes from 3 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
e429bf8
ci: add conventional-commits changelog and release workflow
oscar24357 1ee3026
feat: add i18n with next-intl, en/es catalogs, and language switcher
oscar24357 c321c83
Merge branch 'main' into feat/i18n-support
oscar24357 518ea40
Merge branch 'main' into feat/i18n-support
oscar24357 e96f749
Merge branch 'main' into feat/i18n-support
oscar24357 abc94f3
Merge branch 'main' into feat/i18n-support
oscar24357 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
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
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,95 @@ | ||
| name: Release | ||
|
|
||
| on: | ||
| push: | ||
| tags: | ||
| - 'v*' | ||
|
|
||
| permissions: | ||
| contents: write | ||
|
|
||
| jobs: | ||
| release: | ||
| name: Changelog, GitHub Release & npm publish | ||
| runs-on: ubuntu-latest | ||
| defaults: | ||
| run: | ||
| working-directory: frontend | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 # full history for changelog generation | ||
|
|
||
| - name: Setup pnpm | ||
| uses: pnpm/action-setup@v4 | ||
| with: | ||
| version: 9 | ||
|
|
||
| - name: Setup Node | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: 20 | ||
| registry-url: 'https://registry.npmjs.org' | ||
| cache: pnpm | ||
| cache-dependency-path: frontend/pnpm-lock.yaml | ||
|
|
||
| - name: Install dependencies | ||
| run: pnpm install --frozen-lockfile | ||
|
|
||
| # Extract the version from the tag (strips leading 'v') | ||
| - name: Set version env | ||
| run: echo "RELEASE_VERSION=${GITHUB_REF_NAME#v}" >> "$GITHUB_ENV" | ||
|
|
||
| # Generate / update CHANGELOG.md at the repo root using conventional-changelog | ||
| - name: Update CHANGELOG.md | ||
| working-directory: . | ||
| run: | | ||
| npx --yes conventional-changelog-cli \ | ||
| -p angular \ | ||
| -i CHANGELOG.md \ | ||
| -s \ | ||
| -r 0 | ||
|
|
||
| # Extract only the section for this release to use as the GitHub Release body | ||
| - name: Extract release notes | ||
| id: notes | ||
| working-directory: . | ||
| run: | | ||
| NOTES=$(npx --yes conventional-changelog-cli -p angular -r 1 --outfile /dev/stdout 2>/dev/null) | ||
| # Store as multiline env var | ||
| { | ||
| echo "RELEASE_NOTES<<EOF" | ||
| echo "$NOTES" | ||
| echo "EOF" | ||
| } >> "$GITHUB_ENV" | ||
|
|
||
| # Commit the updated CHANGELOG.md back to the default branch | ||
| - name: Commit CHANGELOG.md | ||
| working-directory: . | ||
| run: | | ||
| git config user.name "github-actions[bot]" | ||
| git config user.email "github-actions[bot]@users.noreply.github.com" | ||
| git add CHANGELOG.md | ||
| # Only commit if there are staged changes | ||
| git diff --cached --quiet || git commit -m "chore: update CHANGELOG.md for ${{ github.ref_name }} [skip ci]" | ||
| git push origin HEAD:main | ||
|
|
||
| # Create the GitHub Release | ||
| - name: Create GitHub Release | ||
| uses: softprops/action-gh-release@v2 | ||
| with: | ||
| tag_name: ${{ github.ref_name }} | ||
| name: ${{ github.ref_name }} | ||
| body: ${{ env.RELEASE_NOTES }} | ||
|
|
||
| # Build and publish @stellarcred/sdk to npm | ||
| - name: Build SDK | ||
| working-directory: frontend/packages/sdk | ||
| run: pnpm build | ||
|
|
||
| - name: Publish to npm | ||
| working-directory: frontend/packages/sdk | ||
| run: pnpm publish --no-git-checks --access public | ||
| env: | ||
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |
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,6 @@ | ||
| # Changelog | ||
|
|
||
| All notable changes to this project will be documented in this file. | ||
|
|
||
| This file is generated automatically from conventional commit messages. | ||
| See [Conventional Commits](https://www.conventionalcommits.org/) for the commit message format. |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| { | ||
| "extends": ["@commitlint/config-conventional"] | ||
| } |
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.
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.