Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .github/workflows/pr-title.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: PR Title

# Validate that PR titles follow the Conventional Commits specification
# (e.g. "feat: ...", "fix: ...", "ci: ..."). This is enforced so that
# release-drafter and changelog tooling can reliably categorise changes.

on:
pull_request_target:
types: [opened, reopened, edited, synchronize]

permissions:
pull-requests: read

jobs:
lint:
name: Conventional Commit
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
58 changes: 58 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Release

# Build and attach artifacts when a version tag is pushed, then publish
# the draft release that release-drafter has already prepared.

on:
push:
tags: ["v*"]

permissions:
contents: write

jobs:
# Re-use the CI workflow so we don't duplicate build definitions.
ci:
uses: ./.github/workflows/ci.yml
permissions:
contents: read

release:
name: Publish Release
runs-on: macos-15
needs: [ci]
steps:
- uses: actions/checkout@v4

- uses: actions/setup-go@v5
with:
go-version-file: go.mod

# Build everything from scratch (cleaner than downloading CI artifacts
# across jobs, and takes ~30s on macos-15 runners).
- name: Build CLI
run: make build-cli

- name: Build Swift app
run: make build-swift

- name: Assemble .app bundle
run: make build-app

- name: Build DMG
run: make build-dmg

# Zip the .app bundle so it survives upload as a single file.
- name: Package .app as zip
run: cd build && zip -r Graftery.app.zip Graftery.app

# Upload artifacts to the release. softprops/action-gh-release will
# find the existing draft (created by release-drafter) for this tag,
# attach the files, and publish it.
- name: Upload release assets
uses: softprops/action-gh-release@v2
with:
files: |
build/Graftery.dmg
build/Graftery.app.zip
build/graftery
Loading