chore: prepare for update #31
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
name: Build Package | |
on: | |
workflow_dispatch: | |
push: | |
tags: | |
- "v[0-9]+.[0-9]+.[0-9]+" | |
permissions: | |
contents: write | |
id-token: write | |
attestations: write | |
env: | |
OUTPUT_PATH: src\Community.PowerToys.Run.Plugin.UnicodeInput\bin | |
PLUGIN_NAME: UnicodeInput | |
jobs: | |
build: | |
strategy: | |
matrix: | |
platform: [ x64 , ARM64 ] | |
runs-on: windows-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Read Version | |
run: | | |
echo "PLUGIN_VERSION=$(git describe --tags --dirty --candidates 1 --always)" >> $env:GITHUB_ENV; | |
echo "Plugin Version is '${{ env.PLUGIN_VERSION }}'" | |
- name: Install .NET Core | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 8.0.x | |
- name: Restore the application | |
run: dotnet restore | |
working-directory: src | |
- name: Execute unit tests | |
run: dotnet test | |
working-directory: src | |
- name: Build the application | |
run: dotnet build --configuration RELEASE /p:Platform=${{matrix.platform}} /p:EnableWindowsTargeting=true | |
working-directory: src | |
- name: Prepare the artifacts | |
run: | | |
Remove-Item -Path ${{ env.OUTPUT_PATH }}\* -Recurse -Include *.xml, *.pdb, PowerToys.*, Wox.* | |
Compress-Archive -Path ${{ env.OUTPUT_PATH }}\${{ matrix.platform }}\Release -DestinationPath "${{ env.PLUGIN_NAME }}-${{ env.PLUGIN_VERSION }}-${{ matrix.platform }}.zip" | |
- name: Upload the artifact(s) | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.platform }} | |
path: ${{ env.PLUGIN_NAME }}-${{ env.PLUGIN_VERSION }}-${{ matrix.platform }}.zip | |
release: | |
runs-on: windows-latest | |
needs: [build] | |
steps: | |
# fetch artifacts from the previous step | |
- name: Download x64 build | |
uses: actions/download-artifact@v4 | |
with: | |
name: x64 | |
- name: Download ARM64 build | |
uses: actions/download-artifact@v4 | |
with: | |
name: ARM64 | |
# upload them | |
- name: Generate artifact attestations | |
uses: actions/attest-build-provenance@v1 | |
with: | |
subject-path: ${{ env.PLUGIN_NAME }}-*.zip | |
- name: Create a release | |
uses: softprops/action-gh-release@v2 | |
with: | |
draft: true | |
files: | | |
${{ env.PLUGIN_NAME }}-*.zip |