Actually read Nodar's nice notes #160
This file contains hidden or 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: create-release | ||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: [ master ] | ||
tags: | ||
- "*" | ||
jobs: | ||
build: | ||
name: build | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- if: ${{ matrix.os == 'windows-latest' }} | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~\AppData\Local\pip\Cache | ||
key: ${{ runner.os }}-pip-${{ hashFiles('setup.py') }} | ||
restore-keys: | | ||
${{ runner.os }}-pip- | ||
- if: ${{ matrix.os == 'macos-13' }} | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/Library/Caches/pip | ||
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} | ||
restore-keys: | | ||
${{ runner.os }}-pip- | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
with: | ||
architecture: x64 | ||
python-version: ${{ matrix.python-version }} | ||
- uses: actions/setup-java@v3 | ||
with: | ||
distribution: "temurin" | ||
java-version: "11.0.20+8" # The JDK version to make available on the path. | ||
java-package: jdk | ||
architecture: x64 | ||
- run: | | ||
pip install --upgrade pip setuptools wheel | ||
pip install numpy==1.23.1 matplotlib==3.1.3 | ||
pip install pyinstaller==4.10 | ||
- env: | ||
LDFLAGS: "-L/usr/local/opt/mysql@8.0/lib -L/usr/local/opt/openssl/lib" | ||
CERTIFICATE_OSX_APPLICATION: ${{ secrets.CERTIFICATE_OSX_APPLICATION }} | ||
CERTIFICATE_PASSWORD: ${{ secrets.CERTIFICATE_PASSWORD }} | ||
# needed for mysql@8.0 | ||
CPPFLAGS: -I/usr/local/opt/mysql@8.0/include | ||
PKG_CONFIG_PATH: /usr/local/opt/mysql@8.0/lib/pkgconfig | ||
if: ${{ matrix.os == 'macos-13' }} | ||
run: | | ||
sed -i '' 's/4.0.0/3.0.4.1/' Info.plist | ||
brew install mysql@8.0 | ||
# needed for mysql@8.0 | ||
# must be run PRIOR to the step its accessed | ||
# https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#adding-a-system-path | ||
echo "/usr/local/opt/mysql@8.0/bin" >> $GITHUB_PATH | ||
if: ${{ matrix.os == 'macos-13' }} | ||
Check failure on line 58 in .github/workflows/release.yml
|
||
working-directory: ./distribution/macos | ||
run: | | ||
make | ||
chmod +x add-osx-certificate.sh && ./add-osx-certificate.sh | ||
chmod +x osx-codesign.sh && ./osx-codesign.sh | ||
ditto -ck --keepParent --rsrc --sequesterRsrc ./dist/CellProfiler-Analyst.app ./dist/CellProfiler-Analyst-macOS-3.0.4.zip | ||
working-directory: ./distribution/macos | ||
- env: | ||
JDK_HOME: C:\hostedtoolcache\windows\Java_Temurin-Hotspot_jdk\11.0.20-8\x64 | ||
if: ${{ matrix.os == 'windows-latest' }} | ||
run: | | ||
pip install cython | ||
pip install --editable . | ||
- if: ${{ matrix.os == 'windows-latest' }} | ||
run: | | ||
pyinstaller distribution/windows/CellProfiler-Analyst.spec | ||
iscc /dMyAppVersion="3.0.4.1" "distribution/windows/CellProfiler-Analyst.iss" | ||
- if: ${{ matrix.os == 'macos-13' }} | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: CellProfiler-Analyst-macOS-3.0.4.1.zip | ||
path: ./distribution/macos/dist/CellProfiler-Analyst-macOS-3.0.4.1.zip | ||
- if: ${{ matrix.os == 'windows-latest' }} | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: CellProfiler-Analyst-Windows-3.0.4.1.exe | ||
path: ./distribution/windows/Output/CellProfiler-Analyst-Windows-3.0.4.1.exe | ||
strategy: | ||
matrix: | ||
os: [macos-13, windows-latest] | ||
python-version: [ "3.8" ] | ||
upload: | ||
name: upload | ||
needs: build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
with: | ||
draft: true | ||
prerelease: true | ||
release_name: ${{ github.ref }} | ||
tag_name: ${{ github.ref }} | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: CellProfiler-Analyst-macOS-3.0.4.1.zip | ||
path: ./ | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: CellProfiler-Analyst-Windows-3.0.4.1.exe | ||
path: ./ | ||
- env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
uses: actions/upload-release-asset@v1 | ||
with: | ||
asset_content_type: application/zip | ||
asset_name: CellProfiler-Analyst-macOS-3.0.4.1.zip | ||
asset_path: /home/runner/work/CellProfiler-Analyst/CellProfiler-Analyst/CellProfiler-Analyst-macOS-3.0.4.1.zip | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
- env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
uses: actions/upload-release-asset@v1 | ||
with: | ||
asset_content_type: application/exe | ||
asset_name: CellProfiler-Analyst-Windows-3.0.4.1.exe | ||
asset_path: /home/runner/work/CellProfiler-Analyst/CellProfiler-Analyst/CellProfiler-Analyst-Windows-3.0.4.1.exe | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} |