Add build workflow and refactor release workflow for improved clarity
This commit is contained in:
40
.github/workflows/build.yml
vendored
Normal file
40
.github/workflows/build.yml
vendored
Normal 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/*
|
||||
12
.github/workflows/release.yml
vendored
12
.github/workflows/release.yml
vendored
@@ -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"
|
||||
Reference in New Issue
Block a user