Skip to content

Commit

Permalink
add build workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
McSwindler committed Mar 15, 2023
1 parent a8f28bb commit c4506b7
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 87 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: dotnet build
on:
push:
paths-ignore:
- '**.md'
jobs:
build:
runs-on: windows-latest
env:
DOTNET_CLI_TELEMETRY_OPTOUT: 'true'

steps:
- uses: actions/checkout@v3
with:
submodules: true

- name: Setup .NET SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0

- name: Download Dalamud
run: |
Invoke-WebRequest -Uri https://goatcorp.github.io/dalamud-distrib/latest.zip -OutFile latest.zip
Expand-Archive -Force latest.zip "$env:AppData\XIVLauncher\addon\Hooks\dev\"
- name: Install dependencies
run: dotnet restore

- name: Build
run: dotnet build --configuration Release --no-restore

- name: Upload dotnet test results
uses: actions/upload-artifact@v3
with:
name: latest.zip
path: SneakOnBy/bin/x64/Release/SneakOnBy/*.zip
Binary file removed Data/goat.png
Binary file not shown.
30 changes: 0 additions & 30 deletions SneakOnBy/Plugin.cs
Original file line number Diff line number Diff line change
@@ -1,17 +1,9 @@
using Dalamud.Game.Command;
using Dalamud.IoC;
using Dalamud.Plugin;
using System.IO;
using Dalamud.Interface.Windowing;
using SneakOnBy.Windows;
using ECommons;
using Dalamud.Game;
using Dalamud.Game.Text;
using Dalamud.Game.Text.SeStringHandling;
using ECommons.DalamudServices;
using Dalamud.Game.Text.SeStringHandling.Payloads;
using Dalamud.Game.ClientState.Conditions;
using Dalamud.Game.ClientState.Objects.Types;

namespace SneakOnBy
{
Expand All @@ -26,7 +18,6 @@ public sealed class Plugin : IDalamudPlugin
public WindowSystem WindowSystem = new("SneakOnBy");

private ConfigWindow ConfigWindow { get; init; }
private MainWindow MainWindow { get; init; }
private Canvas Canvas { get; init; }

public Plugin(
Expand All @@ -43,15 +34,11 @@ public Plugin(
this.Configuration.Initialize(this.PluginInterface);

// you might normally want to embed resources and load them from the manifest stream
var imagePath = Path.Combine(PluginInterface.AssemblyLocation.Directory?.FullName!, "goat.png");
var goatImage = this.PluginInterface.UiBuilder.LoadImage(imagePath);

ConfigWindow = new ConfigWindow(this);
MainWindow = new MainWindow(this, goatImage);
Canvas = new Canvas(this);

WindowSystem.AddWindow(ConfigWindow);
WindowSystem.AddWindow(MainWindow);
WindowSystem.AddWindow(Canvas);

this.CommandManager.AddHandler(CommandName, new CommandInfo(OnCommand)
Expand All @@ -61,7 +48,6 @@ public Plugin(

this.PluginInterface.UiBuilder.Draw += DrawUI;
this.PluginInterface.UiBuilder.OpenConfigUi += DrawConfigUI;
Svc.Condition.ConditionChange += ConditionChange;

}

Expand All @@ -73,7 +59,6 @@ public void Dispose()


ConfigWindow.Dispose();
MainWindow.Dispose();
Canvas.Dispose();

this.CommandManager.RemoveHandler(CommandName);
Expand All @@ -94,20 +79,5 @@ public void DrawConfigUI()
{
ConfigWindow.IsOpen = true;
}

private void ConditionChange(ConditionFlag flag, bool value)
{
if(flag == ConditionFlag.InCombat && value)
{
if (Svc.Targets.SoftTarget is BattleNpc bnpc)
{
Svc.Chat.PrintChat(new XivChatEntry
{
Message = new SeString(new TextPayload("Hello World")),
Type = XivChatType.Echo
});
}
}
}
}
}
7 changes: 0 additions & 7 deletions SneakOnBy/SneakOnBy.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,6 @@
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
</PropertyGroup>

<ItemGroup>
<Content Include="..\Data\goat.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Visible>false</Visible>
</Content>
</ItemGroup>

<PropertyGroup>
<DalamudLibPath>$(appdata)\XIVLauncher\addon\Hooks\dev\</DalamudLibPath>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
Expand Down
4 changes: 2 additions & 2 deletions SneakOnBy/SneakOnBy.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"Author": "McSwindler",
"Name": "Sneak On By",
"Punchline": "Telegraphs aggro ranges to allow for better sneaking.",
"Description": "Adds telegraphs to monster aggro ranges to allow easier sneaking past mobs without fighting. Most helpful in deep dungeons.",
"Punchline": "Shows areas of aggression in Deep Dungeons",
"Description": "Adds markers for the areas around a monster where it will detect you. Allows you to more easily sneak around pesky mosnters.",
"InternalName": "sneakOnBy",
"ApplicableVersion": "any",
"Tags": [
Expand Down
48 changes: 0 additions & 48 deletions SneakOnBy/Windows/MainWindow.cs

This file was deleted.

0 comments on commit c4506b7

Please sign in to comment.