Skip to content

build: bump xcode version #100

build: bump xcode version

build: bump xcode version #100

Workflow file for this run

name: Build & Release
on:
# allow manual runs for debugging purposes
workflow_dispatch: {}
push:
branches:
- main
paths:
- Sources/**/*
- Package.*
- .github/**/*
permissions:
contents: read
jobs:
build:
runs-on: macos-latest
env:
# https://docs.github.com/en/actions/using-workflows/triggering-a-workflow#triggering-a-workflow-from-a-workflow
# https://stackoverflow.com/questions/60418323/triggering-a-new-workflow-from-another-workflow/60418414#60418414
GITHUB_TOKEN: ${{ secrets.GH_PERSONAL_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Trunk Check
uses: trunk-io/trunk-action@v1
with:
# without check-mode, only the diff is checked, but there is no delta
# when running within the context of a tag push
check-mode: all
# TODO is there a way to set swift version explicitly?
- name: setup Xcode version
run: |
# output list of xcode app versions to easily update the selected version
ls /Applications
sudo xcode-select -s /Applications/Xcode_16.1.0.app
- name: Test
run: swift test -vv
- name: Conventional Changelog Action
id: changelog
uses: TriPSs/conventional-changelog-action@v6
with:
skip-version-file: "true"
pre-commit: bin/pre-commit.js
# NOTE if not provided, GITHUB_TOKEN is *not* used!
# https://github.com/TriPSs/conventional-changelog-action/blob/66cc91f84686286f21478f1f781ea8b34bdf0446/action.yml#L16
github-token: ${{ secrets.GH_PERSONAL_TOKEN }}
- name: Build Release Binary
if: ${{ steps.changelog.outputs.skipped == 'false' }}
run: swift build -v -c release --arch arm64 --arch x86_64
- name: Zip Release Binary
if: ${{ steps.changelog.outputs.skipped == 'false' }}
run: zip -rj hyper-focus.zip .build/apple/Products/Release/hyper-focus
- name: Release
if: ${{ steps.changelog.outputs.skipped == 'false' }}
uses: softprops/action-gh-release@v2
with:
files: hyper-focus.zip
# output options: https://github.com/TriPSs/conventional-changelog-action#outputs
body: ${{ steps.changelog.outputs.clean_changelog }}
tag_name: ${{ steps.changelog.outputs.tag }}
- name: Update Homebrew formula
uses: dawidd6/action-homebrew-bump-formula@v4
with:
tap: iloveitaly/homebrew-tap
livecheck: true