Skip to content

Commit

Permalink
ci: add build workflow for WebSearchShortcut plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
Daydreamer-riri committed Mar 14, 2024
1 parent b6c8066 commit 7b9a487
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Build

on:
push:
branches:
- main

env:
PLUGIN_NAME: WebSearchShortcut

jobs:
build:
strategy:
matrix:
platform: [x64, ARM64]

runs-on: windows-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Read version
run: |
[xml]$xml = Get-Content -Path Directory.Build.Props
echo "PLUGIN_VERSION=$($xml.Project.PropertyGroup.Version)" >> $env:GITHUB_ENV
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x

- name: Build
run: dotnet build PowerToys-Run-WebSearchShortcut.sln --configuration Release /p:Platform=${{matrix.platform}} /p:EnableWindowsTargeting=true

- name: Prepare artifact
run: |
Remove-Item -Path Community.PowerToys.Run.Plugin.WebSearchShortcut\bin\* -Recurse -Include *.xml, *.pdb, PowerToys.*, Wox.*
Rename-Item -Path Community.PowerToys.Run.Plugin.WebSearchShortcut\bin\${{matrix.platform}}\Release -NewName $env:PLUGIN_NAME
Compress-Archive -Path Community.PowerToys.Run.Plugin.WebSearchShortcut\bin\${{matrix.platform}}\$env:PLUGIN_NAME -DestinationPath "${{env.PLUGIN_NAME}}-${{env.PLUGIN_VERSION}}-${{matrix.platform}}.zip"

0 comments on commit 7b9a487

Please sign in to comment.