Skip to content

Commit 08461d0

Browse files
uncomment uploading parts
1 parent af4490d commit 08461d0

File tree

4 files changed

+83
-85
lines changed

4 files changed

+83
-85
lines changed

.github/workflows/LocalWindowsInstaller.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -197,8 +197,6 @@ jobs:
197197
198198
- name: Run PyMcaMain with tests (Windows)
199199
shell: pwsh
200-
env:
201-
PYMCA_TEST_MODE: 1
202200
run: |
203201
# Define expected install paths
204202
$basePaths = @(
@@ -228,7 +226,7 @@ jobs:
228226

229227
Write-Host "Found executable at $appPath"
230228

231-
& $appPath
229+
& $appPath --test
232230
exit $LASTEXITCODE
233231

234232
- name: Upload artifacts

.github/workflows/_MacOS.yml

Lines changed: 67 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -373,70 +373,70 @@ jobs:
373373
APP_BASE_NAME="${APP_NAME%.app}"
374374
echo "APP_BASE_NAME=$APP_BASE_NAME" >> $GITHUB_ENV
375375
376-
# - name: Sign, create, and staple the universal2 DMG
377-
# env:
378-
# APPLE_ID: ${{ secrets.APPLE_ID }}
379-
# APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
380-
# CERTIFICATE_PASSWORD: ${{ secrets.APPLE_DEVELOPER_ID_APPLICATION_CERTIFICATE_PASSWORD }}
381-
# CERTIFICATE_BASE64: ${{ secrets.APPLE_DEVELOPER_ID_APPLICATION_CERTIFICATE_BASE64 }}
382-
# KEYCHAIN_PASSWORD: ${{ secrets.APPLE_KEYCHAIN_PASSWORD }}
383-
# APPLICATION_SPECIFIC_PASSWORD: ${{ secrets.APPLE_APPLICATION_SPECIFIC_PASSWORD }}
384-
# run: |
385-
# # Copy the application to location expected by the packaging scripts.
386-
# mkdir -p package/pyinstaller/dist
387-
# cp -a dist/universal2/$APP_NAME package/pyinstaller/dist/PyMca.app
388-
# cd package/pyinstaller
389-
# # Remove unnecessary packages.
390-
# rm -fr dist/PyMca.app/Contents/Frameworks/pkg_resources/tests
391-
# mkdir -p artifacts
392-
# ./codesign.sh
393-
# ./create-dmg.sh
394-
# ./notarize.sh
395-
# VERSION=${APP_NAME#PyMca}; VERSION=${VERSION%.app}
396-
# mv artifacts/PyMca.dmg ../../dist/PyMca${VERSION}.dmg
397-
# cd ../..
398-
# rm -fr package/pyinstaller/dist
399-
# rm -fr package/pyinstaller/artifacts
400-
#
401-
# - name: Mount the DMG
402-
# run: |
403-
# set -e
404-
# DMG_NAME="${{ env.APP_BASE_NAME }}.dmg"
405-
# MOUNT_POINT="/Volumes/${{ env.APP_BASE_NAME }}"
406-
#
407-
# echo "Mounting DMG $DMG_NAME at $MOUNT_POINT"
408-
# hdiutil attach "dist/$DMG_NAME" -mountpoint "$MOUNT_POINT"
409-
#
410-
# - name: Copy .app to /Applications
411-
# run: |
412-
# set -e
413-
# APP_PATH="/Volumes/${{ env.APP_BASE_NAME }}/${{ env.APP_NAME }}"
414-
# sudo cp -R "$APP_PATH" /Applications/
415-
#
416-
# - name: Make main binary executable
417-
# run: chmod +x /Applications/${{ env.APP_NAME }}/Contents/MacOS/PyMcaMain
418-
#
419-
# - name: Run the x86_64 tests
420-
# run: |
421-
# set -e
422-
# arch -x86_64 /Applications/${{ env.APP_NAME }}/Contents/MacOS/PyMcaMain --test
423-
#
424-
# - name: Run the arm64 tests
425-
# run: |
426-
# set -e
427-
# arch -arm64 /Applications/${{ env.APP_NAME }}/Contents/MacOS/PyMcaMain --test
428-
#
429-
# - name: Unmount the DMG
430-
# if: always()
431-
# run: |
432-
# set -e
433-
# MOUNT_POINT="/Volumes/${{ env.APP_BASE_NAME }}"
434-
# echo "Unmounting DMG at $MOUNT_POINT"
435-
# hdiutil detach "$MOUNT_POINT"
436-
#
437-
# - name: Upload the universal2 DMG artifact
438-
# uses: actions/upload-artifact@v4
439-
# with:
440-
# name: macos-universal2-dmg
441-
# path: dist/*.dmg
442-
# retention-days: 1
376+
- name: Sign, create, and staple the universal2 DMG
377+
env:
378+
APPLE_ID: ${{ secrets.APPLE_ID }}
379+
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
380+
CERTIFICATE_PASSWORD: ${{ secrets.APPLE_DEVELOPER_ID_APPLICATION_CERTIFICATE_PASSWORD }}
381+
CERTIFICATE_BASE64: ${{ secrets.APPLE_DEVELOPER_ID_APPLICATION_CERTIFICATE_BASE64 }}
382+
KEYCHAIN_PASSWORD: ${{ secrets.APPLE_KEYCHAIN_PASSWORD }}
383+
APPLICATION_SPECIFIC_PASSWORD: ${{ secrets.APPLE_APPLICATION_SPECIFIC_PASSWORD }}
384+
run: |
385+
# Copy the application to location expected by the packaging scripts.
386+
mkdir -p package/pyinstaller/dist
387+
cp -a dist/universal2/$APP_NAME package/pyinstaller/dist/PyMca.app
388+
cd package/pyinstaller
389+
# Remove unnecessary packages.
390+
rm -fr dist/PyMca.app/Contents/Frameworks/pkg_resources/tests
391+
mkdir -p artifacts
392+
./codesign.sh
393+
./create-dmg.sh
394+
./notarize.sh
395+
VERSION=${APP_NAME#PyMca}; VERSION=${VERSION%.app}
396+
mv artifacts/PyMca.dmg ../../dist/PyMca${VERSION}.dmg
397+
cd ../..
398+
rm -fr package/pyinstaller/dist
399+
rm -fr package/pyinstaller/artifacts
400+
401+
- name: Mount the DMG
402+
run: |
403+
set -e
404+
DMG_NAME="${{ env.APP_BASE_NAME }}.dmg"
405+
MOUNT_POINT="/Volumes/${{ env.APP_BASE_NAME }}"
406+
407+
echo "Mounting DMG $DMG_NAME at $MOUNT_POINT"
408+
hdiutil attach "dist/$DMG_NAME" -mountpoint "$MOUNT_POINT"
409+
410+
- name: Copy .app to /Applications
411+
run: |
412+
set -e
413+
APP_PATH="/Volumes/${{ env.APP_BASE_NAME }}/${{ env.APP_NAME }}"
414+
sudo cp -R "$APP_PATH" /Applications/
415+
416+
- name: Make main binary executable
417+
run: chmod +x /Applications/${{ env.APP_NAME }}/Contents/MacOS/PyMcaMain
418+
419+
- name: Run the x86_64 tests
420+
run: |
421+
set -e
422+
arch -x86_64 /Applications/${{ env.APP_NAME }}/Contents/MacOS/PyMcaMain --test
423+
424+
- name: Run the arm64 tests
425+
run: |
426+
set -e
427+
arch -arm64 /Applications/${{ env.APP_NAME }}/Contents/MacOS/PyMcaMain --test
428+
429+
- name: Unmount the DMG
430+
if: always()
431+
run: |
432+
set -e
433+
MOUNT_POINT="/Volumes/${{ env.APP_BASE_NAME }}"
434+
echo "Unmounting DMG at $MOUNT_POINT"
435+
hdiutil detach "$MOUNT_POINT"
436+
437+
- name: Upload the universal2 DMG artifact
438+
uses: actions/upload-artifact@v4
439+
with:
440+
name: macos-universal2-dmg
441+
path: dist/*.dmg
442+
retention-days: 1

.github/workflows/_PyPI.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ jobs:
4040
python -m pip install --upgrade pip
4141
python -m pip install --upgrade twine
4242
43-
# - name: Upload to PyPI
44-
# env:
45-
# TWINE_USERNAME: __token__
46-
# TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
47-
# run: |
48-
# python -m twine upload --verbose dist/*
43+
- name: Upload to PyPI
44+
env:
45+
TWINE_USERNAME: __token__
46+
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
47+
run: |
48+
python -m twine upload --verbose dist/*

.github/workflows/_Wheels.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -349,12 +349,12 @@ jobs:
349349
run: |
350350
find dist -type f \( -name '*.whl' -o -name '*.tar.gz' \)
351351
352-
# - name: Upload wheels to TestPyPI
353-
# env:
354-
# TWINE_USERNAME: __token__
355-
# TWINE_PASSWORD: ${{ secrets.TESTPYPI_PASSWORD }}
356-
# run: |
357-
# files=$(find dist -type f \( -name '*.whl' -o -name '*.tar.gz' \))
358-
# echo "Uploading files:"
359-
# echo "$files"
360-
# python -m twine upload --verbose --repository testpypi $files
352+
- name: Upload wheels to TestPyPI
353+
env:
354+
TWINE_USERNAME: __token__
355+
TWINE_PASSWORD: ${{ secrets.TESTPYPI_PASSWORD }}
356+
run: |
357+
files=$(find dist -type f \( -name '*.whl' -o -name '*.tar.gz' \))
358+
echo "Uploading files:"
359+
echo "$files"
360+
python -m twine upload --verbose --repository testpypi $files

0 commit comments

Comments
 (0)