Add build workflow and refactor release workflow for improved clarity

This commit is contained in:
2025-07-02 10:12:25 +03:00
parent 1634960492
commit ee24c6ee5a
2 changed files with 44 additions and 8 deletions

40
.github/workflows/build.yml vendored Normal file
View File

@@ -0,0 +1,40 @@
name: Build
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
Build:
runs-on: ubuntu-latest
env:
DALAMUD_HOME: /tmp/dalamud
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set up .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 9.0.x
- name: Download Dalamud Latest
run: |
wget https://goatcorp.github.io/dalamud-distrib/latest.zip -O ${{ env.DALAMUD_HOME }}.zip
unzip ${{ env.DALAMUD_HOME }}.zip -d ${{ env.DALAMUD_HOME }}
- name: Restore Project
run: dotnet restore
- name: Build Project
run: dotnet build --configuration Release CharacterSelectPlugin/CharacterSelectPlugin.csproj
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: CharacterSelectPlugin
path: |
CharacterSelectPlugin/bin/Release/*
!CharacterSelectPlugin/bin/Release/CharacterSelectPlugin/*

View File

@@ -1,15 +1,12 @@
name: Create Release
name: Build and Release
on:
push:
tags:
- "*.*.*.*"
permissions:
contents: write
jobs:
release:
Build:
runs-on: ubuntu-latest
env:
DALAMUD_HOME: /tmp/dalamud
@@ -30,7 +27,7 @@ jobs:
- name: Restore Project
run: dotnet restore
- name: Build
- name: Build Project
run: dotnet build --configuration Release CharacterSelectPlugin/CharacterSelectPlugin.csproj -p:AssemblyVersion=${{ github.ref_name }}
- name: Create Release
@@ -51,5 +48,4 @@ jobs:
-H "Authorization: token ${{ gitea.token }}" \
-H "Content-Type: application/zip" \
--data-binary @CharacterSelectPlugin/bin/Release/CharacterSelectPlugin/latest.zip \
"${{ steps.create_release.outputs.upload_url }}?name=latest.zip"
"${{ steps.create_release.outputs.upload_url }}?name=latest.zip"