Skip to content

build: update build.ps1 #7

build: update build.ps1

build: update build.ps1 #7

Workflow file for this run

name: Build
on:
workflow_dispatch:
push:
tags:
- "[0-9]+.[0-9]+.[0-9]+"
env:
PLUGIN_NAME: JetBrains_Recent_Plugin
jobs:
build:
strategy:
matrix:
platform: [x64, ARM64]
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Read version
run: |
$version = "v$((Get-Content ./JetBrains-Recent-Plugin/plugin.json | ConvertFrom-Json).Version)"
echo "PLUGIN_VERSION=$($version)" >> $env:GITHUB_ENV
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Build
run: dotnet build JetBrains-Recent-Plugin.sln --configuration Release /p:Platform=${{matrix.platform}} /p:EnableWindowsTargeting=true
- name: Prepare artifact
run: |
Remove-Item -Path Jetbrains-Recent-Plugin/bin/* -Recurse -Include *.xml, *.pdb, PowerToys.*, Wox.*
Rename-Item -Path Jetbrains-Recent-Plugin/bin/${{matrix.platform}}/Release/net8.0-windows -NewName $env:PLUGIN_NAME
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{env.PLUGIN_NAME}}-${{env.PLUGIN_VERSION}}-${{matrix.platform}}
path: Jetbrains-Recent-Plugin/bin/${{matrix.platform}}/Release/*