Skip to content

Fix Move operation + some refactor #135

Fix Move operation + some refactor

Fix Move operation + some refactor #135

Workflow file for this run

name: Build & Release
on:
push:
branches: "master"
paths-ignore:
- '**/README.md'
tags:
- "v[0-9]+.[0-9]+.[0-9]+.[0-9]+"
pull_request:
branches: "*"
paths-ignore:
- '**/README.md'
env:
DOTNET_NOLOGO: false
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
jobs:
build:
runs-on: ${{ matrix.runner }}
strategy:
matrix:
runner: [ windows-latest, ubuntu-latest, macos-latest ]
project: [ {name: Server, extraArgs: ' -p:PublishSingleFile=true --self-contained false'}, {name: CentrED, extraArgs: ''} ]
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x
- name: Publish
run: dotnet publish ${{ matrix.project.name }} -c Release -o release_${{ matrix.project.name }} -p:DebugType=None ${{ matrix.project.extraArgs }}
- name: Upload Build Artifact
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.project.name }}-${{ runner.os }}-${{ runner.arch }}
path: ${{ github.workspace }}/release_${{ matrix.project.name }}/*
release:
runs-on: ubuntu-latest
needs: build
steps:
- name: Download build artifacts
uses: actions/download-artifact@v3
with:
path: artifacts/
- name: Install zip
uses: montudor/action-zip@v1
- name: Create archives
run: |
mkdir release
for arch in Linux Windows macOS; do
zip -qq -r release/Cedserver-$arch-x64.zip artifacts/Server-$arch-X64/
zip -qq -r release/CentrED-$arch-x64.zip artifacts/CentrED-$arch-X64/
done
- name: Create Release
uses: ncipollo/[email protected]
if: startsWith(github.ref, 'refs/tags/')
with:
artifacts: release/*
generateReleaseNotes: true
skipIfReleaseExists: true
- name: Create Dev Release
uses: ncipollo/[email protected]
if: github.ref == 'refs/heads/master'
with:
allowUpdates: true
artifacts: release/*
generateReleaseNotes: false
makeLatest: true
prerelease: true
replacesArtifacts: true
tag: dev