Skip to content

Bump version to v0.4.0 #235

Bump version to v0.4.0

Bump version to v0.4.0 #235

Workflow file for this run

name: Build/Release
on:
# only on tags which follow semantic versioning
push:
tags:
- "v*"
jobs:
build-release:
runs-on: macos-latest
strategy:
matrix:
arch: [x64, arm64]
steps:
- name: Check out Git repository
uses: actions/checkout@v1
- name: Set Up Python arm64
if: matrix.arch == 'arm64'
id: setup-python-arm64
run: |
curl -O -L https://www.python.org/ftp/python/3.9.13/python-3.9.13-macos11.pkg
sudo installer -pkg python-3.9.13-macos11.pkg -target /
cd ..
- name: Set Up Python x64
if: matrix.arch == 'x64'
id: setup-python-x64
run: |
curl -O -L https://www.python.org/ftp/python/3.9.13/python-3.9.13-macosx10.9.pkg
sudo installer -pkg python-3.9.13-macosx10.9.pkg -target /
cd ..
- name: Install backend dependencies
id: install-backend-deps
run: |
cd backend
python3.9 -m pip install --upgrade pip
python3.9 -m pip install build
python3.9 -m pip install -U -r requirements.txt
- name: Install Node.js, NPM and Yarn
uses: actions/setup-node@v4
with:
node-version: 18
- name: Install frontend dependencies
id: install-frontend-deps
run: |
cd electron
npm i --yes
- name: Create backend env.py
id: create-backend-env
# NOTE:
# Since July 03, 2025 exifoo is free to use and open source.
# Therefore, there is no need anymore for the Supabase database
run: |
cd backend
touch env.py
echo "import os" >> env.py
echo 'os.environ["STORAGE_KEY"] = "${{ secrets.STORAGE_KEY }}"' >> env.py
echo 'os.environ["SENTRY_DSN"] = "https://0c8ff8b575885439f0ea71f2353ddb31@o4508083247382528.ingest.de.sentry.io/4508632426217552"' >> env.py
# run: |
# cd backend
# touch env.py
# echo "import os" >> env.py
# echo 'os.environ["STORAGE_KEY"] = "${{ secrets.STORAGE_KEY }}"' >> env.py
# echo 'os.environ["SUPABASE_URL"] = "${{ secrets.SUPABASE_URL }}"' >> env.py
# echo 'os.environ["SUPABASE_KEY"] = "${{ secrets.SUPABASE_KEY }}"' >> env.py
# echo 'os.environ["SENTRY_DSN"] = "https://0c8ff8b575885439f0ea71f2353ddb31@o4508083247382528.ingest.de.sentry.io/4508632426217552"' >> env.py
- name: Build backend executable arm64
id: build-backend-arm64
if: matrix.arch == 'arm64'
run: |
cd backend
pyinstaller build_mac_arm64.spec
- name: Build backend executable x64
id: build-backend-x64
if: matrix.arch == 'x64'
run: |
cd backend
pyinstaller build_mac_x64.spec
- name: Prepare for app notarization
# Import Apple API key for app notarization on macOS
run: |
mkdir -p ~/private_keys/
echo "${{ secrets.MAC_API_KEY }}" > ~/private_keys/AuthKey_${{ secrets.MAC_API_KEY_ID }}.p8
- name: Build/release Electron app
uses: codeofandrin/action-electron-builder@master
with:
package_root: ./electron
build_script_name: prebuild
args: ${{ matrix.arch == 'x64' && '--x64' || '--arm64' }}
skip_sign: ${{ !(startsWith(github.ref, 'refs/tags/v')) }}
# GitHub tokens
github_token: ${{ secrets.GH_TOKEN }}
# macOS code signing certificate
mac_certs: ${{ secrets.MAC_CERTS }}
mac_certs_password: ${{ secrets.MAC_CERTS_PASSWORD }}
# If the commit is tagged with a version (e.g. "v1.0.0"),
# release the app after building
release: ${{ startsWith(github.ref, 'refs/tags/v') }}
env:
# macOS Notarization
MAC_API_KEY_ID: ${{ secrets.MAC_API_KEY_ID }}
MAC_API_KEY_ISSUER_ID: ${{ secrets.MAC_API_KEY_ISSUER_ID }}
SKIP_NOTARIZE: ${{ !(startsWith(github.ref, 'refs/tags/v')) }}
SENTRY_DSN: https://28906d568b4e2ece1282720a92ae48d1@o4508083247382528.ingest.de.sentry.io/4508632446795856
- name: Install sentry-cli
run: curl -sL https://sentry.io/get-cli/ | sh
- name: Create Sentry release
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: puncher1
run: |
VERSION=$(sentry-cli releases propose-version)
sentry-cli releases new -p exifoo-electron $VERSION
sentry-cli releases set-commits --auto $VERSION