Skip to content

Commit

Permalink
Merge pull request #156 from nugit/develop
Browse files Browse the repository at this point in the history
27 May 2024 Release
  • Loading branch information
limtingzhi authored May 27, 2024
2 parents db6711d + 9026410 commit 7518ad7
Show file tree
Hide file tree
Showing 42 changed files with 21,665 additions and 9,152 deletions.
44 changes: 19 additions & 25 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,29 @@
version: 2

updates:
# root
- package-ecosystem: "npm"
directory: "/"
- package-ecosystem: 'npm'
directory: '/'
schedule:
interval: "weekly"
day: "monday"
time: "22:00"
interval: 'weekly'
day: 'monday'
time: '22:00'
allow:
- dependency-type: "direct"
reviewers:
- team-engineering-x
target-branch: "develop"
- dependency-type: 'direct'
target-branch: 'develop'
commit-message:
prefix: "fix:"
prefix-development: "chore:"
versioning-strategy: increase-if-necessary
prefix: 'fix:'
prefix-development: 'chore:'
versioning-strategy: increase
ignore:
- dependency-name: "*"
update-types: ["version-update:semver-major"]
- dependency-name: '*'
update-types: ['version-update:semver-major']

# github actions
- package-ecosystem: "github-actions"
directory: "/"
- package-ecosystem: 'github-actions'
directory: '/'
schedule:
interval: "weekly"
day: "monday"
time: "22:00"
reviewers:
- team-engineering-x
target-branch: "develop"
interval: 'weekly'
day: 'monday'
time: '22:00'
target-branch: 'develop'
commit-message:
prefix: "chore:"
prefix: 'chore:'
4 changes: 3 additions & 1 deletion .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: nugit/[email protected]
- uses: actions/checkout@v4
- uses: nugit/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
type: release
base: master
11 changes: 6 additions & 5 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
name: Create Release

on:
schedule:
- cron: '* * 1 * *'
push:
branches:
- 'develop'

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.4.0
- uses: nugit/actions-pr-changelog/createReleaseAction@v1.2.6
- uses: actions/checkout@v4
- uses: nugit/actions-pr-changelog/createReleaseAction@v3.1.0
with:
token: ${{ secrets.GH_TOKEN }}
head: develop
base: master
title: Next Release
reviewers: 'moroine,limtingzhi,tuannugit'
reviewers: 'limtingzhi'
37 changes: 0 additions & 37 deletions .github/workflows/dependabot-merge.yml

This file was deleted.

21 changes: 16 additions & 5 deletions .github/workflows/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,23 @@
name: dependabot-check
name: dependabot

on:
pull_request:

# See https://github.com/dependabot/dependabot-core/issues/3253#issuecomment-852541544
jobs:
check-dependabot:
auto-merge:
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
steps:
- run: echo "PR created by Dependabot"
- uses: fastify/github-action-merge-dependabot@v3
with:
target: minor
merge-method: merge
use-github-auto-merge: true
github-token: ${{ secrets.GH_TOKEN }}
auto-approve:
runs-on: ubuntu-latest
permissions:
pull-requests: write
needs: auto-merge
if: contains(github.head_ref, 'dependabot')
steps:
- uses: hmarr/auto-approve-action@v3
36 changes: 36 additions & 0 deletions .github/workflows/deploy-client.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Deploy

on:
workflow_call:
secrets:
GH_TOKEN:
required: true
NPM_TOKEN:
required: true
SLACK_WEBHOOK:
required: true

jobs:
install:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.GH_TOKEN }}
- run: |
git config user.name github-actions
git config user.email [email protected]
- uses: actions/setup-node@v4
with:
node-version: '16'
cache: 'npm'
- run: echo '//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}' > .npmrc
- run: npm ci
# https://github.com/dhoulb/multi-semantic-release#npm-v85-npm-err-notarget-no-matching-version-found-for
- run: npm config set workspaces-update false
- name: publish
run: npm run deploy:client
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
23 changes: 4 additions & 19 deletions .github/workflows/deploy-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,29 +10,14 @@ jobs:
needs: deploy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.4.0
- uses: actions/checkout@v4
- name: Merge master -> develop
uses: devmasx/[email protected]
with:
type: now
from_branch: master
target_branch: develop
github_token: ${{ secrets.GH_TOKEN }}
deploy: # Runs install once before everything to create & save cache
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
with:
token: ${{ secrets.GH_TOKEN }}
- uses: actions/[email protected]
with:
node-version: '14'
cache: 'yarn'
- run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc
- run: yarn install
- name: publish
run: yarn deploy:client
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
deploy:
uses: ./.github/workflows/deploy-client.yml
secrets: inherit
21 changes: 3 additions & 18 deletions .github/workflows/deploy-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,6 @@ on:
- develop

jobs:
install: # Runs install once before everything to create & save cache
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
with:
token: ${{ secrets.GH_TOKEN }}
- uses: actions/[email protected]
with:
node-version: '14'
cache: 'yarn'
- run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc
- run: yarn install
- name: publish
run: yarn deploy:client
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
deploy:
uses: ./.github/workflows/deploy-client.yml
secrets: inherit
21 changes: 2 additions & 19 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,8 @@ name: Check

on:
push:
branches:
- "master"
- "develop"
pull_request:

jobs:
check:
runs-on: ubuntu-latest
steps:
- if: ${{ github.actor == 'dependabot[bot]' }}
run: echo "Skipping - Will be tested in dependabot-merge"
- uses: actions/[email protected]
if: ${{ github.actor != 'dependabot[bot]' }}
- uses: actions/[email protected]
if: ${{ github.actor != 'dependabot[bot]' }}
with:
node-version: '14'
cache: 'yarn'
- run: yarn install
if: ${{ github.actor != 'dependabot[bot]' }}
- run: yarn lint
if: ${{ github.actor != 'dependabot[bot]' }}
uses: ./.github/workflows/test.yml
secrets: inherit
22 changes: 22 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Test

on:
workflow_call:
secrets:
NPM_TOKEN:
required: true

jobs:
check:
runs-on: ubuntu-latest
permissions:
contents: read
statuses: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '16'
cache: 'npm'
- run: npm ci
- run: npm run lint
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
node_modules/

.npmrc

.DS_Store
2 changes: 1 addition & 1 deletion .husky/commit-msg
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ if [[ -n $HUSKY_BYPASS ]]; then
exit 0;
fi

yarn commitlint --config ./config/commitlint.config.js --edit $1
npx commitlint --config ./config/commitlint.config.js --edit $1
Loading

0 comments on commit 7518ad7

Please sign in to comment.