ci: fix branch creation #31
This file contains hidden or 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: Continuos Integration | |
on: | |
push: | |
branches: | |
- master | |
- develop | |
permissions: | |
contents: write | |
pull-requests: write | |
env: | |
MONGOMS_RUNTIME_DOWNLOAD: 1 | |
MONGOMS_VERSION: 8.0.3 | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup pnpm | |
uses: pnpm/action-setup@v4 | |
- name: Setup node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
cache: pnpm | |
- name: Install dependencies | |
run: pnpm install | |
- name: Build packages | |
run: pnpm build | |
- name: Download binaries | |
run: pnpm download-binaries | |
- name: Run benchmarks | |
run: pnpm start | |
- name: Commit changes | |
run: | | |
git switch --orphan results | |
find -mindepth 1 -maxdepth 1 -not -name .git -delete | |
mv /tmp/mongo-benchmark-results/* . | |
git add . | |
git config --global user.name "Continuos Integration" | |
git config --global user.email "runner@ci" | |
git commit -m 'feat: update results' | |
git push -u origin results | |