Skip to content

Commit

Permalink
chore: update stack
Browse files Browse the repository at this point in the history
  • Loading branch information
adbayb committed Nov 19, 2024
1 parent e471547 commit 818f579
Show file tree
Hide file tree
Showing 22 changed files with 372 additions and 388 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
root = true

[*]
indent_size = 2
indent_size = 4
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
blank_issues_enabled: false
contact_links:
- name: 🤔 Questions and Help
about: Issues are dedicated to bugs, if you have any question, please use the dedicated GitHub discussion category.
- name: 🤔 Questions and Help
about: Issues are dedicated to bugs, if you have any question, please use the dedicated GitHub discussion category.
10 changes: 5 additions & 5 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@

Please include a concise summary of the change with the relevant context and main highlights:

- [ ] What I've done 1
- [ ] What I've done 2...
- [ ] What I've done 1
- [ ] What I've done 2...

## Screenshots

Expand All @@ -24,6 +24,6 @@ Please include a concise summary of the change with the relevant context and mai

## Resources

- Issue (GitHub, ...)
- Specification (ADRs, RFCs, ...)
- ...
- Issue (GitHub, ...)
- Specification (ADRs, RFCs, ...)
- ...
108 changes: 54 additions & 54 deletions .github/workflows/continuous_delivery.yml
Original file line number Diff line number Diff line change
@@ -1,61 +1,61 @@
name: Continous delivery

on:
push:
branches:
- main
push:
branches:
- main

concurrency: ${{ github.workflow }}-${{ github.ref }}

jobs:
integrate:
uses: ./.github/workflows/workflow.yml
release:
timeout-minutes: 5
needs: integrate
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- name: Get node version
run: echo "version=$(cat .nvmrc)" >> $GITHUB_OUTPUT
id: node
- name: Setup node ${{ steps.node.outputs.version }}
uses: actions/setup-node@v4
with:
node-version: ${{ steps.node.outputs.version }}
cache: pnpm
- name: Setup .npmrc
run: |
cat << EOF > "$HOME/.npmrc"
//registry.npmjs.org/:_authToken=$NPM_TOKEN
EOF
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Publish pre-release version(s)
if: "!contains(github.event.head_commit.message, 'chore: release package(s)')"
run: |
pnpm --filter=\!@examples/\* --recursive exec pnpm version "$(pnpm show ./ version)-next-${GITHUB_SHA::7}"
pnpm --filter=\!@examples/\* --recursive exec pnpm publish --tag next --no-git-checks
- name: Create release pull request
if: "!contains(github.event.head_commit.message, 'chore: release package(s)')"
uses: changesets/action@v1
with:
commit: "chore: release package(s)"
title: "chore: release package(s)"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Publish stable version(s)
if: "contains(github.event.head_commit.message, 'chore: release package(s)')"
uses: changesets/action@v1
with:
version: pnpm release:version
publish: pnpm release:publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
integrate:
uses: ./.github/workflows/workflow.yml
release:
timeout-minutes: 5
needs: integrate
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- name: Get node version
run: echo "version=$(cat .nvmrc)" >> $GITHUB_OUTPUT
id: node
- name: Setup node ${{ steps.node.outputs.version }}
uses: actions/setup-node@v4
with:
node-version: ${{ steps.node.outputs.version }}
cache: pnpm
- name: Setup .npmrc
run: |
cat << EOF > "$HOME/.npmrc"
//registry.npmjs.org/:_authToken=$NPM_TOKEN
EOF
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Publish pre-release version(s)
if: "!contains(github.event.head_commit.message, 'chore: release package(s)')"
run: |
pnpm --filter=\!@examples/\* --recursive exec pnpm version "$(pnpm show ./ version)-next-${GITHUB_SHA::7}"
pnpm --filter=\!@examples/\* --recursive exec pnpm publish --tag next --no-git-checks
- name: Create release pull request
if: "!contains(github.event.head_commit.message, 'chore: release package(s)')"
uses: changesets/action@v1
with:
commit: "chore: release package(s)"
title: "chore: release package(s)"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Publish stable version(s)
if: "contains(github.event.head_commit.message, 'chore: release package(s)')"
uses: changesets/action@v1
with:
version: pnpm release:version
publish: pnpm release:publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
8 changes: 4 additions & 4 deletions .github/workflows/continuous_integration.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Continuous integration

on:
push:
branches-ignore: main
push:
branches-ignore: main

jobs:
main:
uses: ./.github/workflows/workflow.yml
main:
uses: ./.github/workflows/workflow.yml
86 changes: 43 additions & 43 deletions .github/workflows/conventional_commit.yml
Original file line number Diff line number Diff line change
@@ -1,48 +1,48 @@
name: Conventional commit

on:
pull_request:
types: [opened, edited]
pull_request:
types: [opened, edited]

jobs:
main:
timeout-minutes: 5
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v5
id: check_pr_rule
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
types: |
build
chore
ci
docs
feat
fix
perf
refactor
revert
style
test
requireScope: false
subjectPattern: ^(?![A-Z]).+$
subjectPatternError: The subject must start with a lowercase character
# Create a sticky comment to display the detailed error
- uses: marocchino/sticky-pull-request-comment@v2
if: always() && (steps.check_pr_rule.outputs.error_message != null)
with:
header: check_pr_comment
message: |
Pull request titles must follow the [Conventional Commits specification](https://www.conventionalcommits.org/).
Please adjust your title following:
```
${{ steps.check_pr_rule.outputs.error_message }}
```
# Delete a previous comment when the issue has been resolved
- if: ${{ steps.check_pr_rule.outputs.error_message == null }}
uses: marocchino/sticky-pull-request-comment@v2
with:
header: check_pr_comment
delete: true
main:
timeout-minutes: 5
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v5
id: check_pr_rule
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
types: |
build
chore
ci
docs
feat
fix
perf
refactor
revert
style
test
requireScope: false
subjectPattern: ^(?![A-Z]).+$
subjectPatternError: The subject must start with a lowercase character
# Create a sticky comment to display the detailed error
- uses: marocchino/sticky-pull-request-comment@v2
if: always() && (steps.check_pr_rule.outputs.error_message != null)
with:
header: check_pr_comment
message: |
Pull request titles must follow the [Conventional Commits specification](https://www.conventionalcommits.org/).
Please adjust your title following:
```
${{ steps.check_pr_rule.outputs.error_message }}
```
# Delete a previous comment when the issue has been resolved
- if: ${{ steps.check_pr_rule.outputs.error_message == null }}
uses: marocchino/sticky-pull-request-comment@v2
with:
header: check_pr_comment
delete: true
Loading

0 comments on commit 818f579

Please sign in to comment.