chore: better handling of errors #55
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
push: | |
tags: | |
- 'v[0-9]+.[0-9]+.[0-9]+' | |
jobs: | |
build-mac: | |
runs-on: macos-latest | |
env: | |
BUILD_CERTIFICATE_BASE64: ${{ secrets.MAC_BUILD_CERTIFICATE_BASE64 }} | |
P12_PASSWORD: ${{ secrets.MAC_BUILD_CERTIFICATE_BASE64_PASSWORD }} | |
KEYCHAIN_PASSWORD: ${{ secrets.MAC_BUILD_CERTIFICATE_BASE64_PASSWORD }} | |
steps: | |
- uses: maxim-lobanov/setup-xcode@v1 | |
with: | |
xcode-version: latest-stable | |
- uses: actions/checkout@v2 | |
- name: Tests | |
run: g++ -o Tests/output -std=c++17 Tests/index.cpp && ./Tests/output | |
- name: Build app | |
working-directory: ./mac | |
run: bash buildApp.sh ${{github.ref_name}} | |
- name: Upload zip | |
uses: actions/upload-artifact@v4 | |
with: | |
name: macArtifact | |
retention-days: 1 | |
path: | | |
mac/dist/mac.zip | |
build-win: | |
runs-on: windows-latest | |
steps: | |
- name: Add msbuild to PATH | |
uses: microsoft/setup-msbuild@v1.1 | |
- uses: actions/checkout@v2 | |
# TODO: | |
# - name: Tests | |
# - run: g++ -o Tests/output -std=c++17 Tests/index.cpp && ./Tests/output | |
# open `Developer PowerShell for VS 2022` or similar | |
# $ cl .\Tests\index.cpp /std:c++17 /Fe"Tests/output.exe" /Fo"Tests/output.obj" | .\Tests\output.exe | |
- name: Build and zip the app | |
working-directory: ./win | |
run: | | |
bash buildSetVersion.sh ${{github.ref_name}} | |
powershell .\buildApp.ps1 | |
- name: Upload zip | |
uses: actions/upload-artifact@v4 | |
with: | |
name: winArtifact | |
retention-days: 1 | |
path: | | |
win/dist/win.zip | |
release: | |
runs-on: ubuntu-latest | |
needs: [build-mac, build-win] | |
steps: | |
- uses: actions/download-artifact@v4.1.7 | |
with: | |
name: macArtifact | |
path: buildMac | |
- uses: actions/download-artifact@v4.1.7 | |
with: | |
name: winArtifact | |
path: buildWin | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: | | |
buildMac/mac.zip | |
buildWin/win.zip |