-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
58364f7
commit 827f559
Showing
24 changed files
with
3,114 additions
and
87 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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Pull Request | ||
|
||
## Description | ||
|
||
<!-- Provide a brief description of the changes introduced by this pull request --> | ||
|
||
## Related Issue | ||
|
||
Closes SW-0000 | ||
|
||
<!-- Find your issue from: https://mask.atlassian.net/jira/software/c/projects/FW/boards/33/backlog --> | ||
|
||
## Checklist | ||
|
||
- [ ] I have tested these changes locally. | ||
- [ ] I have reviewed the code changes. | ||
- [ ] I have added unit tests if applicable. |
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: "Conventional Commits" | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- edited | ||
- synchronize | ||
branches: | ||
- "!sync-submodule-changes" | ||
- "!l10n_crowdin_action" | ||
|
||
jobs: | ||
main: | ||
name: validate | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: amannn/action-semantic-pull-request@v5 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
wip: 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Crowdin Download | ||
|
||
on: | ||
schedule: | ||
- cron: '0 0 * * *' # every day at 00:00 (midnight) | ||
- cron: '0 12 * * *' # every day at 12:00 PM (noon) | ||
|
||
# start via Actions tab in Github UI | ||
workflow_dispatch: | ||
|
||
jobs: | ||
download-translations: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Download from Crowdin | ||
uses: crowdin/github-action@v1 | ||
with: | ||
upload_translations: false | ||
download_translations: true | ||
create_pull_request: true | ||
pull_request_body: 'FW-0000' | ||
pull_request_base_branch_name: 'main' | ||
pull_request_labels: 'automated' | ||
project_id: ${{ secrets.CROWDIN_PROJECT_ID }} | ||
token: ${{ secrets.CROWDIN_PERSONAL_TOKEN }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Crowdin Upload | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
# start via Actions tab in Github UI | ||
workflow_dispatch: | ||
|
||
jobs: | ||
upload-translations: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
# all locales must be extracted before upload on the main branch | ||
- name: Upload to Crowdin | ||
uses: crowdin/github-action@v1 | ||
with: | ||
upload_translations: true | ||
download_translations: false | ||
project_id: ${{ secrets.CROWDIN_PROJECT_ID }} | ||
token: ${{ secrets.CROWDIN_PERSONAL_TOKEN }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: CSpell | ||
|
||
on: | ||
push: | ||
|
||
jobs: | ||
spellcheck: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
with: | ||
submodules: 'true' | ||
|
||
- name: Authenticate NPM | ||
uses: DimensionDev/github-token-action@latest | ||
with: | ||
registry: true | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '18.9.0' | ||
|
||
- uses: pnpm/action-setup@v2 | ||
- name: Install dependencies | ||
run: pnpm install | ||
|
||
- name: Run CSpell | ||
run: npx cspell "**/*" |
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 |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: ESLint | ||
|
||
on: | ||
push: | ||
branches: | ||
- '**' | ||
- '!main' | ||
- '!released' | ||
jobs: | ||
eslint: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
with: | ||
submodules: 'true' | ||
|
||
- name: Authenticate NPM | ||
uses: DimensionDev/github-token-action@latest | ||
with: | ||
registry: true | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '18.9.0' | ||
|
||
- uses: pnpm/action-setup@v2 | ||
- name: Install dependencies | ||
run: pnpm install | ||
|
||
- name: Run ESLint | ||
run: npx eslint --fix . | ||
|
||
- name: Check for changes in src/* | ||
id: check-changes | ||
run: echo "::set-output name=changes::$(git diff --name-only -- 'src/*')" | ||
|
||
- name: Commit changes if any | ||
uses: EndBug/add-and-commit@v9 | ||
with: | ||
message: 'chore: eslint' |
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: "Check Jira Issue Key" | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- edited | ||
- synchronize | ||
branches: | ||
- "!sync-submodule-changes" | ||
- "!l10n_crowdin_action" | ||
merge_group: | ||
types: [checks_requested] | ||
|
||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: DimensionDev/jira-issue-key-checker@master | ||
if: ${{ github.event.pull_request }} | ||
with: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
jira-prefix: 'SW' |
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 |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: Lingui | ||
|
||
on: | ||
push: | ||
branches: | ||
- '**' | ||
- '!main' | ||
- '!released' | ||
|
||
jobs: | ||
extract: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
with: | ||
submodules: 'true' | ||
|
||
- name: Authenticate NPM | ||
uses: DimensionDev/github-token-action@latest | ||
with: | ||
registry: true | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '18.9.0' | ||
|
||
- uses: pnpm/action-setup@v2 | ||
- name: Install dependencies | ||
run: pnpm install | ||
|
||
- name: Run Lingui | ||
run: npm run lingui | ||
|
||
- name: Check for changes in src/locales/*.po | ||
id: check-changes | ||
run: echo "::set-output name=changes::$(git diff --name-only -- 'src/locales/*.po')" | ||
|
||
- name: Commit changes if any | ||
uses: EndBug/add-and-commit@v9 | ||
with: | ||
message: 'chore: lingui extract' |
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 |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: Prettier | ||
|
||
on: | ||
push: | ||
branhces: | ||
- '**' | ||
- '!main' | ||
- '!released' | ||
|
||
jobs: | ||
prettier: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
with: | ||
submodules: 'true' | ||
|
||
- name: Authenticate NPM | ||
uses: DimensionDev/github-token-action@latest | ||
with: | ||
registry: true | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '18.9.0' | ||
|
||
- uses: pnpm/action-setup@v2 | ||
- name: Install dependencies | ||
run: pnpm install | ||
|
||
- name: Check code style with Prettier | ||
run: npx prettier . -w | ||
|
||
- name: Check for changes in src/* | ||
id: check-changes | ||
run: echo "::set-output name=changes::$(git diff --name-only -- 'src/*')" | ||
|
||
- name: Commit changes if any | ||
uses: EndBug/add-and-commit@v9 | ||
with: | ||
message: 'chore: prettier' | ||
|
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 |
---|---|---|
@@ -0,0 +1,70 @@ | ||
name: Release | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: 'The next version to release, e.g. 0.1.0' | ||
required: true | ||
type: string | ||
release_kind: | ||
description: 'Select the release kind: major, minor, or patch' | ||
required: true | ||
default: 'patch' | ||
type: choice | ||
options: | ||
- major | ||
- minor | ||
- patch | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Validate version format | ||
id: validate_version | ||
run: | | ||
if ! [[ "${{ inputs.version }}" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then | ||
echo "Invalid version format. Please use Semantic Versioning (SemVer) format, e.g., 0.1.0" | ||
exit 1 | ||
fi | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
fetch-tags: true | ||
|
||
- name: Check if version exists | ||
id: check_version | ||
run: | | ||
if git rev-parse "v${{ inputs.version }}" >/dev/null 2>&1; then | ||
echo "Version already exists. Aborting release." | ||
exit 1 | ||
fi | ||
- name: Set up Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '14' | ||
|
||
- name: Bump version | ||
id: bump_version | ||
run: | | ||
npm version ${{ inputs.version }} --no-git-tag-version | ||
- name: Commit version | ||
run: | | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "GitHub Action" | ||
git add package.json | ||
git commit -m "[Release] ${{ inputs.release_kind }} v${{ inputs.version }}" | ||
- name: Tag version | ||
run: | | ||
git tag v${{ inputs.version }} | ||
- name: Push version | ||
run: | | ||
git branch -f released | ||
git push origin released:released --force --tags |
Oops, something went wrong.