do these things not work across jobs? And don't error out if unset? H… #16
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
name: Build optimized | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- master | |
jobs: | |
linux: | |
runs-on: ubuntu-latest | |
container: ghcr.io/pyca/cryptography-manylinux_2_28:x86_64 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
filter: tree:0 | |
- name: Dependencies | |
run: dnf install -y gtk3-devel zip | |
- name: Workaround for https://github.com/actions/runner/issues/2033 | |
run: chown -R $(id -u):$(id -g) $PWD | |
- name: Build | |
run: ./make-linux.sh | |
- name: Upload Artifacts | |
uses: actions/[email protected] | |
with: | |
name: linux-x64-gui.zip | |
path: ./flips | |
windows: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
filter: tree:0 | |
- name: Build | |
run: bash ./make-windows.sh | |
- name: Upload Artifacts | |
uses: actions/[email protected] | |
with: | |
name: windows-x64-gui.zip | |
path: ./flips.exe | |
macos: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
filter: tree:0 | |
- name: Dependencies | |
run: brew install gtk+3 libomp llvm | |
- name: Build | |
run: CXX=/opt/homebrew/opt/llvm/bin/clang++ TARGET=gtk ./make-macos.sh | |
- name: Upload Artifacts | |
uses: actions/[email protected] | |
with: | |
name: macos-m1-gui.zip | |
path: ./flips | |
create-release: | |
runs-on: ubuntu-latest | |
needs: [linux, windows, macos] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
filter: tree:0 | |
- name: Download binaries | |
uses: actions/download-artifact@v4 | |
with: | |
path: builds/ | |
- name: Find Flips version | |
id: flips_version | |
run: echo version=$(git rev-list --count master) >> $GITHUB_OUTPUT | |
- name: Create zips | |
run: | | |
mv builds/linux-x64-gui.zip/flips flips | |
zip -9 ./flips-linux.zip flips COPYING COPYING.gpl3 | |
mv builds/windows-x64-gui.zip/flips.exe flips.exe | |
zip -9 ./flips-windows.zip flips.exe COPYING COPYING.gpl3 | |
#mv builds/macos-m1-gui.zip/flips flips-mac | |
#zip -9 ./flips-macos.zip flips-mac COPYING COPYING.gpl3 | |
- name: Upload GitHub Release | |
uses: svenstaro/[email protected] | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: flips-*.zip | |
file_glob: true | |
tag: v${{ steps.flips_version.outputs.version }} | |
body: "A release of commit ${{ github.sha }}." |