Skip to content

Bump actions/download-artifact from 7 to 8 #178

Bump actions/download-artifact from 7 to 8

Bump actions/download-artifact from 7 to 8 #178

Workflow file for this run

# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
name: .NET
on:
push:
branches: [ "master" ]
tags: ["v*.*.*"]
pull_request:
branches: [ "master" ]
permissions:
contents: write
env:
BUILD_CONFIGURATION: ${{ (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')) && 'Release' || 'Debug' }}
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
os: ["win-x64", "linux-x64", "linux-arm64", "osx-x64", "osx-arm64"]
steps:
- uses: actions/checkout@v6
- run: pwd
- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: 10.0.x
- name: Build
run: dotnet build -c "$BUILD_CONFIGURATION"
- name: Publish
run: dotnet publish -r ${{ matrix.os }} -c "$BUILD_CONFIGURATION" --self-contained
- name: Compress artifacts
run: |
if [[ "${{ matrix.os }}" == "win-x64" ]]; then
zip -j -r "ArchipelagoDebugClient-${{ matrix.os }}.zip" ArchipelagoDebugClient.Desktop/bin/${{ env.BUILD_CONFIGURATION }}/net8.0/${{ matrix.os }}/publish/*
else
tar -czf "ArchipelagoDebugClient-${{ matrix.os }}.tar.gz" -C ArchipelagoDebugClient.Desktop/bin/${{ env.BUILD_CONFIGURATION }}/net8.0/${{ matrix.os }}/publish .
fi
- name: Upload build artifacts
uses: actions/upload-artifact@v6
with:
name: ${{ format('ArchipelagoDebugClient-{0}', matrix.os) }}
path: ${{ format('ArchipelagoDebugClient-{0}.{1}', matrix.os, matrix.os == 'win-x64' && 'zip' || 'tar.gz') }}
release:
needs:
- build
runs-on: ubuntu-latest
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
steps:
- name: Download artifacts
uses: actions/download-artifact@v8
with:
path: artifacts
- name: Publish Release
uses: softprops/action-gh-release@v2
with:
draft: false
generate_release_notes: true
fail_on_unmatched_files: true
files: |-
artifacts/**/*.zip
artifacts/**/*.tar.gz