Skip to content

Fix: ver

Fix: ver #3

name: Build macOS Application
on:
push:
branches:
- main
jobs:
build:
runs-on: macos-latest
steps:
# Step 1: Check out the repository
- name: Checkout Code
uses: actions/checkout@v3
# Step 2: Get the latest tag or commit hash
- name: Get Version
id: version
run: |
git fetch --tags
TAG=$(git describe --tags --abbrev=0 || echo "v0.0.0")
echo "TAG=$TAG" >> $GITHUB_ENV
echo "VERSION=${TAG}" >> $GITHUB_ENV
# Step 3: Set up Python
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.9"
# Step 4: Install dependencies
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pyinstaller
# Step 5: Build the macOS application
- name: Build .app using pyinstaller
run: |
pyinstaller --onefile --noconsole --windowed --icon=images/logo.icns --add-data "images:images" browser_amnesia_gui.py
mv dist/browser_amnesia_gui.app "dist/BrowserAmnesia_${{ env.VERSION }}.app"
# Step 6: Create a Release and Upload .app
- name: Create GitHub Release
uses: ncipollo/release-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ env.VERSION }}
name: "BrowserAmnesia macOS App ${{ env.VERSION }}"
artifacts: "dist/BrowserAmnesia_${{ env.VERSION }}.app"
generateReleaseNotes: true