chore(ci): remove macos packaging

Signed-off-by: aarnphm-ec2-dev <29749331+aarnphm@users.noreply.github.com>
This commit is contained in:
aarnphm-ec2-dev
2023-07-19 23:25:12 +00:00
parent e69042a8e9
commit 4beb040cfd

View File

@@ -239,81 +239,3 @@ jobs:
with:
name: installers
path: installers/*
macos-packaging:
name: Build macOS installer
if: ${{ false }} # XXX: eh disable installer for MacOS for now, needs more investigation
needs: binaries
runs-on: macos-12
env:
VERSION: ${{ needs.binaries.outputs.version }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Pull latest change
run: git pull --autostash --no-edit --gpg-sign --ff origin main
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install PyOxidizer ${{ env.PYOXIDIZER_VERSION }}
run: pip install pyoxidizer==${{ env.PYOXIDIZER_VERSION }}
- name: Install create-dmg
run: brew install create-dmg
- name: Download staged binaries
uses: actions/download-artifact@v3
with:
name: staged-${{ runner.os }}
path: archives
- name: Extract staged binaries
run: |-
mkdir bin
for f in archives/*; do
tar -xzf "$f" -C bin
done
- name: Archive binaries
run: |-
rm archives/*
cd bin
for f in *; do
tar -czf "../archives/$f.tar.gz" "$f"
done
# bin/<APP_NAME>-<VERSION>-<TARGET> -> targets/<TARGET>/<APP_NAME>
- name: Prepare binaries
run: |-
mkdir targets
for f in bin/*; do
if [[ "$f" =~ ${{ env.VERSION }}-(.+)$ ]]; then
target="${BASH_REMATCH[1]}"
mkdir "targets/$target"
mv "$f" "targets/$target/${{ env.APP_NAME }}"
fi
done
- name: Build app bundle
run: >-
pyoxidizer build macos_app_bundle --release --var version ${{ env.VERSION }}
- name: Stage app bundle
id: stage
run: |-
mkdir staged
mv build/*/release/*/*.app staged
app_bundle="$(ls staged)"
app_name="${app_bundle:0:${#app_bundle}-4}"
echo "app-bundle=$app_bundle" >> "$GITHUB_OUTPUT"
echo "app-name=$app_name-${{ env.VERSION }}.dmg" >> "$GITHUB_OUTPUT"
echo "dmg-file=$app_name-${{ env.VERSION }}.dmg" >> "$GITHUB_OUTPUT"
- name: Create DMG
run: >-
create-dmg --volname "${{ steps.stage.outputs.app-name }}" --hide-extension "${{ steps.stage.outputs.app-bundle }}" --window-pos 200 120 --window-size 800 400 --icon-size 100 --app-drop-link 600 185 "${{ steps.stage.outputs.dmg-file }}" staged
- name: Upload binaries
uses: actions/upload-artifact@v3
with:
name: standalone
path: archives/*
if-no-files-found: error
- name: Upload installer
uses: actions/upload-artifact@v3
with:
name: installers
path: ${{ steps.stage.outputs.dmg-file }}