mirror of
https://github.com/Picocrypt/Picocrypt.git
synced 2025-06-28 14:16:14 +02:00
Create test builds on pr
This commit is contained in:
parent
20b7573a13
commit
d2506df677
3 changed files with 198 additions and 0 deletions
57
.github/workflows/pr-test-build-macos.yml
vendored
Normal file
57
.github/workflows/pr-test-build-macos.yml
vendored
Normal file
|
@ -0,0 +1,57 @@
|
|||
name: pr-test-build-macos
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
pr-test-build-macos:
|
||||
runs-on: macos-15
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: '>=1.24'
|
||||
check-latest: true
|
||||
cache: false
|
||||
|
||||
- name: Install packages
|
||||
run: |
|
||||
brew install glfw glew
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
cd src
|
||||
go mod download
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
cd src
|
||||
go build -v -ldflags="-s -w" -o Picocrypt Picocrypt.go
|
||||
env:
|
||||
CGO_ENABLED: 1
|
||||
|
||||
- name: Package as .app in a .dmg
|
||||
run: |
|
||||
mv dist/macos/Picocrypt.app.zip .
|
||||
unzip -d Picocrypt.app Picocrypt.app.zip
|
||||
rm Picocrypt.app.zip
|
||||
mv src/Picocrypt Picocrypt.app/Contents/MacOS/Picocrypt
|
||||
mkdir out
|
||||
cp -R Picocrypt.app out
|
||||
hdiutil create Picocrypt.dmg -volname Picocrypt -fs APFS -format UDZO -srcfolder out
|
||||
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: pr-test-build-macos-ONLY-FOR-TESTING
|
||||
path: |
|
||||
Picocrypt.dmg
|
||||
if-no-files-found: error
|
||||
compression-level: 9
|
Loading…
Add table
Add a link
Reference in a new issue