-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
functionality for multiple mods, workflow
- Loading branch information
Showing
6 changed files
with
201 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: .NET Core Desktop | ||
|
||
on: | ||
push: | ||
branches: [ "Master" ] | ||
pull_request: | ||
branches: [ "Master" ] | ||
|
||
jobs: | ||
|
||
build: | ||
|
||
strategy: | ||
matrix: | ||
configuration: [Release] | ||
|
||
runs-on: windows-latest # For a list of available runner types, refer to | ||
# https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on | ||
|
||
env: | ||
Test_Project_Path: src/Downloader.csproj # Replace with the path to your test project, i.e. MyWpfApp.Tests\MyWpfApp.Tests.csproj. | ||
Root: src/ | ||
|
||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
# Install the .NET Core workload | ||
- name: Install .NET Core | ||
uses: actions/setup-dotnet@v3 | ||
with: | ||
dotnet-version: 6.0.x | ||
|
||
# Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild | ||
- name: Setup MSBuild.exe | ||
uses: microsoft/setup-msbuild@v1.0.2 | ||
|
||
# Restore the application to populate the obj folder with RuntimeIdentifiers | ||
- name: Restore the application | ||
run: msbuild $env:Test_Project_Path /t:restore /p:Configuration=$env:Configuration | ||
- name: publish the application | ||
run: msbuild $env:Test_Project_Path /t:publish /p:Configuration=$env:Configuration | ||
env: | ||
Configuration: ${{ matrix.configuration }} | ||
|
||
# Upload the MSIX package: https://github.com/marketplace/actions/upload-a-build-artifact | ||
- name: Upload build artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: Modinstaller.exe | ||
path: src\bin\Release\net6.0\win10-x64\publish\Downloader.exe |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
using System.Net.Http; | ||
using System.Net.Http.Json; | ||
using System.Threading.Tasks; | ||
using System.Collections.Generic; | ||
|
||
namespace Modinstaller | ||
{ | ||
public partial class Modinstaller | ||
{ | ||
public static async Task<HttpResponseMessage> Fetchlatestrelease(string url) | ||
{ | ||
HttpResponseMessage connection; | ||
Json assets = await client.GetFromJsonAsync<Json>(url); | ||
Assets linktozip = assets.Assets.Find(link => link.Browser_download_url.EndsWith("zip")); | ||
modversion = assets.Name; | ||
return connection = await client.GetAsync(linktozip.Browser_download_url); | ||
} | ||
|
||
public static async Task<HttpResponseMessage> Fetchfromallreleases(string url) | ||
{ | ||
HttpResponseMessage connection; | ||
List<Json> data = new(); | ||
var jsonstring = client.GetAsync(url).Result; | ||
data = await jsonstring.Content.ReadAsAsync<List<Json>>(); | ||
Json zip = data.Find(x => x.Assets[0].Browser_download_url.Contains("zip")); | ||
System.Console.WriteLine(zip.Assets[0].Browser_download_url); | ||
return connection = await client.GetAsync(zip.Assets[0].Browser_download_url); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters