Prepare release #42
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This file uses GitHub actions to create a release, including an | |
# installer | |
name: Prepare release | |
on: | |
release: | |
types: | |
- created | |
jobs: | |
build: | |
env: | |
PROJECT: XLKitLearn | |
APP_ID: YaocNmA99ZWqRnwKgQKZKayRJojMjq | |
APP_PUBLISHER: Dynamic Analytics LLC | |
RELEASE_TAG: ${{ github.event.release.tag_name }} | |
RELEASE_NAME: ${{ github.event.release.name }} | |
runs-on: windows-2022 | |
strategy: | |
matrix: | |
architecture: ['x64'] | |
steps: | |
- name: Starting and printing github context for debugging | |
run: echo "$GITHUB_CONTEXT" | |
- name: Check out repo code | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.8' | |
architecture: ${{ matrix.architecture }} | |
- name: Install Python dependencies | |
run: | | |
python -m pip install -r requirements.txt | |
- name: Run the installer prep | |
shell: bash | |
run: | | |
python .github/workflows/prepare_release.py | |
- name: Create zipped up Python distro | |
run: | | |
python .github/workflows/zip_up_python.py .github/Output/python-distro-${{ matrix.architecture }} | |
# The below otuputs the following errors - need to investigate | |
# Installation steps done | |
# C:\Program Files\dotnet\sdk\8.0.205\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(90,5): error NETSDK1203: Ahead-of-time compilation is not supported for the target runtime identifier 'win-x86'. [D:\a\xlkitlearn\xlkitlearn\AzureSignTool\src\AzureSignTool\AzureSignTool.csproj] | |
# | |
# The build failed. Fix the build errors and run again. | |
# C:\Program Files\dotnet\sdk\8.0.205\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(90,5): error NETSDK1203: Ahead-of-time compilation is not supported for the target runtime identifier 'win-x86'. [D:\a\xlkitlearn\xlkitlearn\AzureSignTool\src\AzureSignTool\AzureSignTool.csproj] | |
# | |
# The build failed. Fix the build errors and run again. | |
# C:\Program Files\dotnet\sdk\8.0.205\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(90,5): error NETSDK1203: Ahead-of-time compilation is not supported for the target runtime identifier 'win-x86'. [D:\a\xlkitlearn\xlkitlearn\AzureSignTool\src\AzureSignTool\AzureSignTool.csproj] | |
# | |
# The build failed. Fix the build errors and run again. | |
# - name: Clone the AzureSignTool repo (I haven't figured out how to sign macros using the AzureSignTool below, it fails with error 800B0003) | |
# shell: bash | |
# run: git clone https://github.com/vcsjones/AzureSignTool.git | |
# - name: Sign the xltm file | |
# run: | | |
# echo "Installing files needed to sign excel macros" | |
# .github\macro_signing_files\vcredist_x64.exe /install /passive /norestart | |
# Regsvr32 .github\macro_signing_files\msosip.dll | |
# Regsvr32 .github\macro_signing_files\msosipx.dll | |
# echo "Installation steps done" | |
# cp XLKitLearn.xltm "AzureSignTool/src/AzureSignTool/XLKitLearn.xltm" | |
# cd AzureSignTool/src/AzureSignTool | |
# dotnet run sign "XLKitLearn.xltm" -kvu "${{ secrets.AZURE_KEY_VAULT_URI }}" -kvi "${{ secrets.AZURE_CLIENT_ID }}" -kvt "${{ secrets.AZURE_TENANT_ID }}" -kvs "${{ secrets.AZURE_CLIENT_SECRET }}" -kvc "${{ secrets.AZURE_CERT_NAME }}" -tr "http://timestamp.digicert.com" -r win-x86 --verbose | |
# dotnet run sign "XLKitLearn.xltm" -kvu "${{ secrets.AZURE_KEY_VAULT_URI }}" -kvi "${{ secrets.AZURE_CLIENT_ID }}" -kvt "${{ secrets.AZURE_TENANT_ID }}" -kvs "${{ secrets.AZURE_CLIENT_SECRET }}" -kvc "${{ secrets.AZURE_CERT_NAME }}" -tr "http://timestamp.digicert.com" -r win-x86 --verbose | |
# dotnet run sign "XLKitLearn.xltm" -kvu "${{ secrets.AZURE_KEY_VAULT_URI }}" -kvi "${{ secrets.AZURE_CLIENT_ID }}" -kvt "${{ secrets.AZURE_TENANT_ID }}" -kvs "${{ secrets.AZURE_CLIENT_SECRET }}" -kvc "${{ secrets.AZURE_CERT_NAME }}" -tr "http://timestamp.digicert.com" -r win-x86 --verbose | |
# - name: copy the signed xltm file back | |
# shell: bash | |
# run: | | |
# cp "AzureSignTool/src/AzureSignTool/XLKitLearn.xltm" "XLKitLearn.xltm" | |
- name: Add the location of the install creator to the path | |
shell: bash | |
run: echo "C:\Program Files (x86)\Windows Kits\10\bin\10.0.22000.0\x64" >> $GITHUB_PATH | |
- name: Create the installer | |
run: iscc .github/installer.iss | |
- name: Rename the installer to include bitness | |
shell: bash | |
run: mv .github/Output/${{ env.PROJECT }}.exe .github/Output/${{ env.PROJECT }}-${{ matrix.architecture }}.exe | |
- name: Instal the sign tool | |
shell: bash | |
run: dotnet tool install --global AzureSignTool | |
- name: Sign the installer | |
shell: bash | |
run: AzureSignTool sign -kvu "${{ secrets.AZURE_KEY_VAULT_URI }}" -kvi "${{ secrets.AZURE_CLIENT_ID }}" -kvt "${{ secrets.AZURE_TENANT_ID }}" -kvs "${{ secrets.AZURE_CLIENT_SECRET }}" -kvc ${{ secrets.AZURE_CERT_NAME }} -tr http://timestamp.digicert.com -v .github/Output/${{ env.PROJECT }}-${{ matrix.architecture }}.exe | |
- name: Upload files to the GitHub release page | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
.github/Output/${{ env.PROJECT }}-${{ matrix.architecture }}.exe | |
.github/Output/python-distro-${{ matrix.architecture }}.zip | |
XLKitLearn_installer.sh | |
version | |
earliest_allowable_version | |
xlkitlearn_dorequest.applescript | |
XLKitLearn.xltm | |
w2v_small.bin |