🛟 Arrumador: Configure standard tooling and CI #9
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: Release | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - master | |
| tags: | |
| - 'v*' | |
| pull_request: | |
| branches: | |
| - main | |
| - master | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: jdx/mise-action@v2 | |
| with: | |
| experimental: true | |
| - name: Install dependencies | |
| run: mise run install | |
| - name: Codegen | |
| run: mise run codegen | |
| - name: Check for changes and create PR | |
| uses: peter-evans/create-pull-request@v6 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| commit-message: 'chore: update generated code' | |
| title: 'chore: update generated code' | |
| body: 'This PR updates the generated code.' | |
| branch: 'codegen-update' | |
| base: 'main' | |
| delete-branch: true | |
| - name: CI | |
| run: mise run ci | |
| - name: Release | |
| if: startsWith(github.ref, 'refs/tags/') | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: gh release create ${{ github.ref_name }} --generate-notes | |
| - name: Artifacts | |
| if: startsWith(github.ref, 'refs/tags/') | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| tar -czf build.tar.gz build || echo "No build directory" | |
| gh release upload ${{ github.ref_name }} build.tar.gz || true |