From d04f83d1e288b646d14a48983d36d864f59f7011 Mon Sep 17 00:00:00 2001 From: carlisom Date: Tue, 24 Sep 2024 16:26:16 -0500 Subject: [PATCH] Fix releases (#76) * Fix pypi release * Fix windows release --- .github/workflows/release_pypi.yml | 12 +++++++++- .github/workflows/release_windows.yml | 34 +++++++++++++++++++++++++-- 2 files changed, 43 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release_pypi.yml b/.github/workflows/release_pypi.yml index 9b79b09..bb31ab2 100644 --- a/.github/workflows/release_pypi.yml +++ b/.github/workflows/release_pypi.yml @@ -10,7 +10,17 @@ jobs: release: runs-on: ubuntu-latest steps: - - uses: ./.github/workflows/build_python + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: '3.x' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install setuptools_scm[toml]>=3.4 setuptools>=42 wheel twine>=3.3.0 + - name: Build + run: | + python setup.py sdist bdist_wheel - name: Build and publish env: TWINE_USERNAME: __token__ diff --git a/.github/workflows/release_windows.yml b/.github/workflows/release_windows.yml index b0f0f55..86adbc5 100644 --- a/.github/workflows/release_windows.yml +++ b/.github/workflows/release_windows.yml @@ -9,8 +9,38 @@ jobs: release: runs-on: windows-latest steps: - - uses: ./.github/workflows/build_windows - secrets: inherit + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: "3.8" + - name: Install requirements + run: | + python -m pip install -r requirements.txt + python -m pip install pywin32 + python -m pip install setuptools_scm[toml]>=3.4 setuptools>=42 wheel + - name: Install windows requirements, prepare + run: | + powershell "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::TLS12" + powershell "Set-ExecutionPolicy Unrestricted" + powershell scripts/windows/install_inno_setup.ps1 + powershell scripts/windows/install_verpatch.ps1 + powershell scripts/windows/patch_json_schema.ps1 + - name: Build + run: | + python setup.py bdist_msi + python scripts/windows/write_alcli_version.py + - name: Sign + env: + CERT: ${{ secrets.CERT }} + CERT_PWD: ${{ secrets.CERT_PWD }} + run: | + powershell scripts/windows/cleanup.ps1 + powershell scripts/windows/verpatch_cli.ps1 + powershell scripts/windows/load_sign_cert.ps1 + powershell scripts/windows/sign_cli.ps1 + powershell scripts/windows/build_inno_setup.ps1 + mv dist\alcli*.msi dist\alcli_setup.msi + powershell scripts/windows/sign_cli_msi.ps1 - name: Prepare Assets run: | mv dist/alcli_setup.exe AlertlogicCLISetup.exe