Skip to content

Release

Release #64

Workflow file for this run

on:
workflow_dispatch:
name: Release
permissions:
contents: read
jobs:
build:
name: Build (${{matrix.architecture}})
runs-on: windows-2022
strategy:
fail-fast: false
matrix:
architecture: [ x86, x64, arm64 ]
steps:
- name: Checkout
uses: actions/checkout@v6
with:
persist-credentials: false
- name: Build configure
shell: cmd
run: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat"
msbuild Configure.sln /m /t:Rebuild /p:Configuration=Release,Platform=${{matrix.architecture}}
- name: Upload executable
uses: actions/upload-artifact@v5
with:
name: Configure.Release.${{matrix.architecture}}
path: Artifacts/Release/${{matrix.architecture}}/bin
release:
name: Release
runs-on: windows-2022
needs: build
permissions:
contents: write
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v6
- uses: actions/download-artifact@v6
name: Download executables
with:
path: ${{github.workspace}}/Artifacts
merge-multiple: true
- name: Install dotnet sign
shell: cmd
run: dotnet tool install --global sign --prerelease
- name: Azure CLI login with federated credential
uses: azure/login@a457da9ea143d694b1b9c7c869ebb04ebe844ef5 # v2.3.0
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
- name: Sign executables
run: sign code trusted-signing `
--trusted-signing-account ImageMagick `
--trusted-signing-certificate-profile ImageMagick `
--trusted-signing-endpoint https://eus.codesigning.azure.net `
--azure-credential-type azure-cli `
--verbosity information `
*.exe
working-directory: ${{github.workspace}}/Artifacts
- name: Create Configs archive
shell: cmd
run: |
powershell -Command "Compress-Archive -Path 'ColorProfiles','Configs','Installer','OpenCL','PerlMagick','Tools' -DestinationPath 'files.zip'"
- name: Set version
shell: bash
run: echo "VERSION=$(date +'%Y.%m.%d.%H%M')" >> $GITHUB_ENV
- name: Create and push tag
shell: bash
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git tag $VERSION
git push origin $VERSION
- name: Publish release
shell: cmd
env:
GH_TOKEN: ${{github.token}}
run: gh release create "%VERSION%" --title "Release %VERSION%" ${{github.workspace}}\Artifacts\Configure.Release.x64.exe ${{github.workspace}}\Artifacts\Configure.Release.arm64.exe ${{github.workspace}}\Artifacts\Configure.Release.x86.exe ${{github.workspace}}\files.zip