This commit is contained in:
@@ -0,0 +1,57 @@
|
|||||||
|
name: Build UniVerse plugin
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
- staging
|
||||||
|
paths:
|
||||||
|
- '.gitea/workflows/build-plugin.yml'
|
||||||
|
- 'SfeduSchedule.Plugin.UniVerse/**'
|
||||||
|
- 'HeadProject/ModeusSchedule.Abstractions/**'
|
||||||
|
pull_request:
|
||||||
|
paths:
|
||||||
|
- '.gitea/workflows/build-plugin.yml'
|
||||||
|
- 'SfeduSchedule.Plugin.UniVerse/**'
|
||||||
|
- 'HeadProject/ModeusSchedule.Abstractions/**'
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
env:
|
||||||
|
DOTNET_VERSION: 10.0.x
|
||||||
|
PROJECT_PATH: SfeduSchedule.Plugin.UniVerse/SfeduSchedule.Plugin.UniVerse.csproj
|
||||||
|
BUILD_CONFIGURATION: Release
|
||||||
|
ARTIFACT_NAME: SfeduSchedule.Plugin.UniVerse
|
||||||
|
ARTIFACT_PATH: artifacts/SfeduSchedule.Plugin.UniVerse
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: Build library
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container: catthehacker/ubuntu:act-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Setup .NET
|
||||||
|
uses: actions/setup-dotnet@v4
|
||||||
|
with:
|
||||||
|
dotnet-version: ${{ env.DOTNET_VERSION }}
|
||||||
|
|
||||||
|
- name: Restore dependencies
|
||||||
|
run: dotnet restore "${{ env.PROJECT_PATH }}"
|
||||||
|
|
||||||
|
- name: Build plugin
|
||||||
|
run: dotnet build "${{ env.PROJECT_PATH }}" --configuration "${{ env.BUILD_CONFIGURATION }}" --no-restore
|
||||||
|
|
||||||
|
- name: Prepare artifact
|
||||||
|
run: |
|
||||||
|
mkdir -p "${{ env.ARTIFACT_PATH }}"
|
||||||
|
cp -R "SfeduSchedule.Plugin.UniVerse/bin/${{ env.BUILD_CONFIGURATION }}/net10.0/." "${{ env.ARTIFACT_PATH }}/"
|
||||||
|
|
||||||
|
- name: Upload plugin artifact
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: ${{ env.ARTIFACT_NAME }}
|
||||||
|
path: ${{ env.ARTIFACT_PATH }}
|
||||||
|
if-no-files-found: error
|
||||||
Reference in New Issue
Block a user