Skip to content

Fix: sudo xattr -r -c #7

Fix: sudo xattr -r -c

Fix: sudo xattr -r -c #7

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.app"
# Step 6: Compress the .app into a .zip file
- name: Compress .app file
run: |
cd dist
zip -r "BrowserAmnesia_${{ env.VERSION }}.zip" "BrowserAmnesia.app"
# Step 7: Create a Release and Upload .zip
- 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 }}.zip"
generateReleaseNotes: true