Merge pull request #168 from educorvi/dependabot/npm_and_yarn/vite-4.5.5 #497
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
name: CI | |
on: | |
push: | |
branches: [ main, develop ] | |
pull_request: | |
branches: [ main, develop ] | |
merge_group: | |
branches: [ develop ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [ 18.x, 20.x, 22.x ] | |
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/ | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'yarn' | |
- run: yarn install --immutable | |
- run: yarn workspaces foreach -Rpt --from timeclicker_client run build | |
rebase: | |
if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
needs: [ build ] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
ref: 'main' | |
- name: Rebase develop | |
run: | | |
git checkout develop | |
git rebase main | |
git push | |
release: | |
if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
needs: [ build, rebase ] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
token: ${{secrets.EDUCORVI_DEV_PAT}} | |
- name: Setup NodeJS | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 22 | |
cache: 'yarn' | |
- run: yarn install | |
- run: yarn run semantic-release -e semantic-release-monorepo | |
name: Release Server | |
working-directory: ./server | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- run: yarn up | |
- name: Generate license file for client | |
run: yarn run licenses | |
working-directory: ./client | |
- run: yarn run semantic-release -e semantic-release-monorepo | |
name: Release Client | |
working-directory: ./client | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- run: yarn up | |
- name: Git Settings | |
run: | | |
git config user.name 'Educorvi Developer Bot' | |
git config user.email 'developers@educorvi.de' | |
- name: Commit | |
run: | | |
git add -A | |
git diff-index --quiet main || git commit -am "chore: version [skip ci]" | |
- name: Push | |
run: | | |
git push | |
final_rebase: | |
if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
needs: [ release ] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
ref: 'main' | |
- name: Rebase develop | |
run: | | |
git checkout develop | |
git rebase main | |
git push | |
docker: | |
if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request' | |
needs: [ release ] | |
uses: ./.github/workflows/docker.yml | |
deploy: | |
if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request' | |
needs: [ release, docker ] | |
uses: ./.github/workflows/deploy.yml | |
secrets: inherit |