Browse Source

Update building workflow to support 32bit Windows and Notarization

pull/1735/head
Safihre 4 years ago
parent
commit
9f42eb3ad7
  1. 33
      .github/workflows/build_release.yml
  2. 2
      builder/package.py

33
.github/workflows/build_release.yml

@ -12,9 +12,14 @@ jobs:
- name: macOS
os: macos-latest
python-version: 3.9
- name: Windows
- name: Windows (64 bit)
os: windows-latest
python-version: 3.9
python-arch: x64
- name: Windows (32 bit)
os: windows-latest
python-version: 3.9
python-arch: x86
steps:
- uses: actions/checkout@v2
@ -22,6 +27,7 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
architecture: ${{ matrix.python-arch }}
- name: Install Python dependencies
run: |
python --version
@ -29,29 +35,38 @@ jobs:
pip install --upgrade -r requirements.txt
pip install --upgrade -r builder/requirements.txt
- name: Build source distribution
if: runner.os == 'Windows'
if: runner.os == 'Windows' && matrix.python-arch == 'x64'
run: python builder/package.py source
- name: Upload source distribution
if: runner.os == 'Windows'
if: runner.os == 'Windows' && matrix.python-arch == 'x64'
uses: actions/upload-artifact@v2
with:
path: "*-src.tar.gz"
name: Source distribution
- name: Build Windows standalone binary and installer
if: runner.os == 'Windows'
- name: Build Windows standalone binary and installer (64bit)
if: runner.os == 'Windows' && matrix.python-arch == 'x64'
run: python builder/package.py installer
- name: Upload Windows standalone binary (64bit)
if: runner.os == 'Windows'
if: runner.os == 'Windows' && matrix.python-arch == 'x64'
uses: actions/upload-artifact@v2
with:
path: "*-win64-bin.zip"
name: Windows Windows standalone binary (64bit)
- name: Upload Windows installer
if: runner.os == 'Windows'
- name: Upload Windows installer (64bit)
if: runner.os == 'Windows' && matrix.python-arch == 'x64'
uses: actions/upload-artifact@v2
with:
path: "*-win-setup.exe"
name: Windows installer
- name: Build Windows standalone binary (32bit)
if: runner.os == 'Windows' && matrix.python-arch == 'x86'
run: python builder/package.py binary
- name: Upload Windows standalone binary (32bit)
if: runner.os == 'Windows' && matrix.python-arch == 'x86'
uses: actions/upload-artifact@v2
with:
path: "*-win32-bin.zip"
name: Windows Windows standalone binary (32bit)
- name: Import codesign certificates
uses: apple-actions/import-codesign-certs@v1
if: runner.os == 'macOS' && github.event_name == 'push'
@ -65,6 +80,8 @@ jobs:
python builder/make_dmg.py
env:
SIGNING_AUTH: ${{ secrets.SIGNING_AUTH }}
NOTARIZATION_USER: ${{ secrets.NOTARIZATION_USER }}
NOTARIZATION_PASS: ${{ secrets.NOTARIZATION_PASS }}
- name: Upload macOS binary
if: runner.os == 'macOS'
uses: actions/upload-artifact@v2

2
builder/package.py

@ -275,7 +275,7 @@ if __name__ == "__main__":
print("Signed %s!" % file_to_sign)
# Only notarize for real builds that we want to deploy
if notarization_user and notarization_pass and "release" in os.environ.get("TRAVIS_TAG", ""):
if notarization_user and notarization_pass and "/tags/" in os.environ.get("GITHUB_REF", ""):
# Prepare zip to upload to notarization service
print("Creating zip to send to Apple notarization service")
# We need to use ditto, otherwise the signature gets lost!

Loading…
Cancel
Save