-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add automated release builds for tagged versions #11
Comments
Bonus: interested people can use Github's "watch" feature to be notified of new releases (Watch->Custom->Releases) |
@noahlias I noticed your fork has basic CI setup, if it works well, would you like to make a PR? |
It benefits from the recent release of github action container containing macos14, but my CI is too simple, if I want to distribute it, I probably need to set the dmg format, and also set the application icon, etc.
It's my simple build.yaml. Since I am a fork's project, I must configure a personal access token name: Build and Release
on:
push:
branches:
- main
jobs:
macos-build:
runs-on: macos-14
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup CMake and Ninja
uses: lukka/get-cmake@latest
with:
cmakeVersion: 3.25.2
ninjaVersion: 1.11.1
# https://github.com/actions/runner-images/blob/main/images/macos/macos-14-arm64-Readme.md
- name: Build project
run: |
export DEVELOPER_DIR=/Applications/Xcode_14.3.1.app/Contents/Developer
sudo xcode-select -s $DEVELOPER_DIR
cmake -G "Ninja" -DCMAKE_BUILD_TYPE=Release -S . -B build
cmake --build build
- name: Create tarball
run: tar czvf awirt.tar.gz -C build awrit/Release
- name: Create GitHub Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.PAT }}
with:
tag_name: v0.1.2
release_name: Release v0.1.2
draft: false
prerelease: false
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.PAT }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./awirt.tar.gz
asset_name: awrit.tar.gz
asset_content_type: application/gzip I made it because it didn't work on M1 pro(the switch Xcode version didn't work), so I used actions to build it for my personal use. |
macOS releases are now built automatically and are available by using brew |
Make sure that building for macOS actually produces an arm64 binary, not an x64 binary on the GitHub action runner.
The text was updated successfully, but these errors were encountered: