name: Release # Tagging is the whole release process: push a v* tag and the binaries build, # get checksummed and attach themselves to the release. install.sh reads the # latest release, so nothing else has to be updated by hand. on: push: tags: ["v*"] workflow_dispatch: inputs: tag: description: "Existing tag to build and attach binaries to" required: true permissions: contents: write jobs: binaries: runs-on: ubuntu-latest env: EMAIL_QUEUE_TEST_REDIS_URL: redis://127.0.0.1:6379 services: redis: image: redis:8-alpine ports: - 6379:6379 options: >- --health-cmd "redis-cli ping" --health-interval 5s --health-timeout 3s --health-retries 20 steps: - uses: actions/checkout@v4 with: ref: ${{ github.event.inputs.tag || github.ref }} # Pinned to the version package.json names. "latest" broke the 0.3.0 # build the day Bun 1.4.1 shipped: `bun build --compile` downloads the # cross-compile targets for its own version, and those lag the release. - uses: oven-sh/setup-bun@v2 with: bun-version-file: package.json - name: Install run: bun install --frozen-lockfile - name: Typecheck run: bun x tsc --noEmit -p tsconfig.json - name: Test run: bun test packages/synconfig/test packages/core/test packages/email-queue/test packages/plugin-outreachgraph/test packages/plugin-crawlproof/test packages/plugin-calendar/test packages/plugin-dashboard/test apps/cli/test apps/web/test # Bun cross-compiles every target from one runner, so there is no build # matrix and no per-platform runner to keep in step. - name: Build binaries working-directory: apps/cli run: bun build-binaries.ts - name: Attach to the release env: GH_TOKEN: ${{ github.token }} TAG: ${{ github.event.inputs.tag || github.ref_name }} working-directory: apps/cli/dist/bin run: | gh release view "$TAG" --repo "$GITHUB_REPOSITORY" >/dev/null 2>&1 \ || gh release create "$TAG" --repo "$GITHUB_REPOSITORY" --title "myna ${TAG#v}" --generate-notes gh release upload "$TAG" --repo "$GITHUB_REPOSITORY" --clobber \ myna-linux-x86_64 myna-linux-x86_64-baseline myna-linux-aarch64 \ myna-darwin-x86_64 myna-darwin-arm64 myna-windows-x86_64.exe SHA256SUMS