Skip to content

🛟 Arrumador: Configure standard tooling and CI #13

🛟 Arrumador: Configure standard tooling and CI

🛟 Arrumador: Configure standard tooling and CI #13

Workflow file for this run

name: Autorelease
on:
push:
branches:
- main
tags:
- 'v*'
pull_request:
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
ci:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install mise
uses: jdx/mise-action@v2
- name: Install dependencies
run: mise run install
- name: Codegen
run: mise run codegen
- name: Check for changes and create PR
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
if [[ -n $(git status --porcelain) ]]; then
echo "Changes detected, creating PR..."
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
BRANCH_NAME="chore/codegen-update-$(date +%s)"
git checkout -b "$BRANCH_NAME"
git add .
git commit -m "chore: update generated code"
git push origin "$BRANCH_NAME"
gh pr create --title "chore: update generated code" --body "Automated PR to update generated code." --base main --head "$BRANCH_NAME"
else
echo "No changes detected."
fi
- name: CI
run: mise run ci
- name: Release
if: startsWith(github.ref, 'refs/tags/')
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release create ${{ github.ref_name }} --generate-notes
- name: Upload Artifacts
if: startsWith(github.ref, 'refs/tags/')
uses: actions/upload-artifact@v4
with:
name: build-artifact
path: .svelte-kit/