Skip to content

Commit

Permalink
fix actions
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnCorby committed May 5, 2024
1 parent 4c93a5f commit 2abd7fa
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 28 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ jobs:
- uses: actions/upload-artifact@v2
with:
name: Raicuparta.QuantumSpaceBuddies
path: .\QSB\Bin\Debug
path: .\QSB-NH\Bin\Debug
10 changes: 3 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ permissions:
env:
PROJ_USERNAME: Raicuparta
PROJ_NAME: QuantumSpaceBuddies
REAL_PROJ_NAME: QSB

jobs:
pre_job:
Expand All @@ -34,7 +33,7 @@ jobs:

- name: Read Manifest
id: read-manifest
run: echo "manifest=$(< ./${{ env.REAL_PROJ_NAME }}/manifest.json sed ':a;N;$!ba;s/\n/ /g')" >> $GITHUB_OUTPUT
run: echo "manifest=$(< ./QSB/manifest.json sed ':a;N;$!ba;s/\n/ /g')" >> $GITHUB_OUTPUT

- name: Check For Release
id: check-tag
Expand Down Expand Up @@ -63,20 +62,17 @@ jobs:
- name: Setup .NET
uses: "actions/setup-dotnet@v3"

- name: Remove .csproj.user
run: if (Test-Path ${{ env.REAL_PROJ_NAME }}/${{ env.REAL_PROJ_NAME }}.csproj.user) { rm ${{ env.REAL_PROJ_NAME }}/${{ env.REAL_PROJ_NAME }}.csproj.user }

- name: Build Mod
run: dotnet build -c Release

- name: Upload Artifact
uses: "actions/upload-artifact@v3"
with:
name: "${{ env.PROJ_USERNAME }}.${{ env.PROJ_NAME }}"
path: "${{ env.REAL_PROJ_NAME }}/bin/Release"
path: "QSB-NH/bin/Release"

- name: Zip For Release
run: 7z a ${{ env.PROJ_USERNAME }}.${{ env.PROJ_NAME }}.zip ./${{ env.REAL_PROJ_NAME }}/bin/Release/**
run: 7z a ${{ env.PROJ_USERNAME }}.${{ env.PROJ_NAME }}.zip ./QSB-NH/bin/Release/**

- name: Create Release
uses: "ncipollo/release-action@v1"
Expand Down
23 changes: 23 additions & 0 deletions QSB-NH/QSB-NH.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,27 @@
</Reference>
</ItemGroup>



<!-- qsb-nh is the top of the dependency graph so things have to be done here-->
<Target Name="clean after building" AfterTargets="PostBuildEvent">
<ItemGroup>
<_Files Remove="@(_Files)" />
<_Files Include="$(OutputPath)\*.exe.config" />
</ItemGroup>
<Delete Files="@(_Files)" />
</Target>

<PropertyGroup>
<UnityDllsDir Condition="Exists('$(UnityAssetsDir)')">$(UnityAssetsDir)\Dlls</UnityDllsDir>
</PropertyGroup>
<Target Name="copy dlls to unity" AfterTargets="PostBuildEvent" Condition="Exists('$(UnityDllsDir)')">
<ItemGroup>
<_Files Remove="@(_Files)" />
<_Files Include="$(OutputPath)/*.dll" />
<_Files Include="$(OutputPath)/*.exe" />
</ItemGroup>
<Copy SourceFiles="@(_Files)" DestinationFolder="$(UnityDllsDir)" />
</Target>

</Project>
20 changes: 0 additions & 20 deletions QSB/QSB.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,30 +13,10 @@
<NoWarn>CS1998;CS0649</NoWarn>
</PropertyGroup>

<Target Name="clean after building" AfterTargets="PostBuildEvent">
<ItemGroup>
<_Files Remove="@(_Files)" />
<_Files Include="$(OutputPath)\*.exe.config" />
</ItemGroup>
<Delete Files="@(_Files)" />
</Target>

<Target Name="weave qsb" AfterTargets="PostBuildEvent">
<Exec Command=".\MirrorWeaver &quot;$(TargetPath)&quot;" WorkingDirectory="..\MirrorWeaver\bin\$(Configuration)\" />
</Target>

<PropertyGroup>
<UnityDllsDir Condition="Exists('$(UnityAssetsDir)')">$(UnityAssetsDir)\Dlls</UnityDllsDir>
</PropertyGroup>
<Target Name="copy dlls to unity" AfterTargets="PostBuildEvent" Condition="Exists('$(UnityDllsDir)')">
<ItemGroup>
<_Files Remove="@(_Files)" />
<_Files Include="$(OutputPath)/*.dll" />
<_Files Include="$(OutputPath)/*.exe" />
</ItemGroup>
<Copy SourceFiles="@(_Files)" DestinationFolder="$(UnityDllsDir)" />
</Target>

<ItemGroup>
<None Include="..\LICENSE">
<Pack>True</Pack>
Expand Down

0 comments on commit 2abd7fa

Please sign in to comment.