Skip to content

fixes

fixes #463

Workflow file for this run

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@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
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@v3
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@v3
with:
fetch-depth: 0
token: ${{secrets.EDUCORVI_DEV_PAT}}
- name: Setup NodeJS
uses: actions/setup-node@v3
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@v3
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