fix: add 'delegating' status to SQLite CHECK constraint #34
Workflow file for this run
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: | |
| tags: | |
| - 'v*.*.*' | |
| permissions: | |
| contents: write | |
| jobs: | |
| bump-versions: | |
| name: Bump versions in repo | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| ref: master | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Update package.json versions | |
| run: | | |
| VERSION="${{ github.ref_name }}" | |
| VERSION="${VERSION#v}" | |
| node -e " | |
| const fs = require('fs'); | |
| const v = '$VERSION'; | |
| ['package.json', 'apps/server/package.json', 'packages/cli/package.json'].forEach(f => { | |
| const pkg = JSON.parse(fs.readFileSync(f, 'utf8')); | |
| pkg.version = v; | |
| fs.writeFileSync(f, JSON.stringify(pkg, null, 2) + '\n'); | |
| }); | |
| " | |
| - name: Commit and push | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git diff --quiet || ( | |
| git add package.json apps/server/package.json packages/cli/package.json && | |
| git commit -m "chore: bump version to ${{ github.ref_name }}" && | |
| git push | |
| ) | |
| create-release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| generate_release_notes: true | |
| - name: Notify Discord | |
| if: env.DISCORD_WEBHOOK_URL != '' | |
| env: | |
| DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }} | |
| run: | | |
| VERSION="${{ github.ref_name }}" | |
| RELEASE_URL="https://github.com/${{ github.repository }}/releases/tag/${VERSION}" | |
| curl -s -X POST "$DISCORD_WEBHOOK_URL" \ | |
| -H "Content-Type: application/json" \ | |
| -d "{ | |
| \"embeds\": [{ | |
| \"title\": \"🚀 Marionette ${VERSION} is out!\", | |
| \"url\": \"${RELEASE_URL}\", | |
| \"color\": 5793266, | |
| \"fields\": [ | |
| {\"name\": \"Install / Update\", \"value\": \"\`\`\`npm install -g @marionette-app/cli\`\`\`\", \"inline\": false}, | |
| {\"name\": \"Release Notes\", \"value\": \"[View on GitHub](${RELEASE_URL})\", \"inline\": false} | |
| ] | |
| }] | |
| }" | |
| build: | |
| name: Build ${{ matrix.artifact }} | |
| needs: create-release | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: macos-latest # arm64 GitHub-hosted runner | |
| artifact: macos-arm64 | |
| build_cmd: bash scripts/build-release.sh macos-arm64 | |
| upload_file: marionette-macos-arm64.tar.gz | |
| - os: macos-15-intel # x64 GitHub-hosted runner (macos-13 retired Dec 2025) | |
| artifact: macos-x64 | |
| build_cmd: bash scripts/build-release.sh macos-x64 | |
| upload_file: marionette-macos-x64.tar.gz | |
| - os: ubuntu-latest | |
| artifact: linux-x64 | |
| build_cmd: bash scripts/build-release.sh linux-x64 | |
| upload_file: marionette-linux-x64.tar.gz | |
| - os: windows-latest | |
| artifact: windows-x64 | |
| build_cmd: pwsh scripts/build-release.ps1 windows-x64 | |
| upload_file: marionette-windows-x64.zip | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: pnpm | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Build release archive | |
| run: ${{ matrix.build_cmd }} | |
| - name: Upload release artifact | |
| run: gh release upload "${{ github.ref_name }}" "${{ matrix.upload_file }}" --clobber | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| publish-npm: | |
| name: Publish @marionette-app/cli to npm | |
| needs: create-release | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| registry-url: https://registry.npmjs.org | |
| - name: Publish to npm | |
| run: | | |
| VERSION="${{ github.ref_name }}" | |
| VERSION="${VERSION#v}" | |
| # Patch version directly to avoid npm workspace protocol errors | |
| node -e " | |
| const fs = require('fs'); | |
| const pkg = JSON.parse(fs.readFileSync('packages/cli/package.json', 'utf8')); | |
| pkg.version = '$VERSION'; | |
| fs.writeFileSync('packages/cli/package.json', JSON.stringify(pkg, null, 2) + '\n'); | |
| " | |
| # Publish from /tmp to avoid npm picking up pnpm workspace:* deps | |
| cp -r packages/cli /tmp/marionette-cli | |
| cd /tmp/marionette-cli | |
| npm publish --access public | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |