Skip to content

update upload artifact version #12

update upload artifact version

update upload artifact version #12

Workflow file for this run

name: Publish .NET Application
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet publish -c Release --self-contained -p:PublishTrimmed=true -o ./publish
- name: Archive build (Ubuntu)
if: matrix.os == 'ubuntu-latest'
run: tar -czvf xpathrunner-ubuntu.tar.gz -C ./publish .
- name: Archive build (macOS)
if: matrix.os == 'macos-latest'
run: tar -czvf xpathrunner-macos.tar.gz -C ./publish .
- name: Archive build (Windows)
if: matrix.os == 'windows-latest'
run: Compress-Archive -Path ./publish/* -DestinationPath xpathrunner-windows.zip
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}-build
path: |
xpathrunner-ubuntu.tar.gz
xpathrunner-macos.tar.gz
xpathrunner-windows.zip