Skip to content

Commit

Permalink
Merge pull request #6 from DREDGE-Mods/dev
Browse files Browse the repository at this point in the history
Nuget attempts
  • Loading branch information
xen-42 authored Oct 10, 2023
2 parents 1300cb1 + 268d54c commit 9686910
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 1 deletion.
26 changes: 26 additions & 0 deletions .github/workflows/release_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ jobs:
Update_Release:
name: 'Create/Update Release Asset'
needs: Build
outputs:
version: ${{ steps.version.outputs.prop }}
if: ${{ github.ref != 'refs/heads/master' && contains(github.event.pull_request.labels.*.name, 'update-pr') }}
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -69,3 +71,27 @@ jobs:
artifacts: Winch.zip, DisasterButton.zip, ExampleItems.zip, IntroSkipper.zip
draft: true
prerelease: false
Pack_Nuget:
name: Pack nuget
needs: Update_Release
runs-on: windows-latest
steps:
- name: Download Winch Asset
uses: actions/download-artifact@v3
with:
name: Winch
path: Winch
- name: Get version
id: version
uses: notiz-dev/github-action-json-property@release
with:
path: Winch\mod_meta.json
prop_path: Version
- name: Set up nuget
uses: NuGet/[email protected]
- name: Pack nuget
run: nuget pack package -OutputFileNamesWithoutVersion -OutputDirectory build -Properties "version=${{ steps.version.outputs.prop }};"
- name: Publish nuget
run: |
nuget push "build/Winch.nupkg" -ApiKey ${{ secrets.NUGET_KEY }} -Source https://api.nuget.org/v3/index.json
1 change: 1 addition & 0 deletions Winch/Winch.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<LangVersion>11</LangVersion>
<CopyLocalLockFileAssemblies>false</CopyLocalLockFileAssemblies>
<Nullable>enable</Nullable>
<NuspecFile>Winch.nuspec</NuspecFile>
</PropertyGroup>

<PropertyGroup>
Expand Down
18 changes: 18 additions & 0 deletions Winch/Winch.nuspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<package >
<metadata>
<requireLicenseAcceptance>false</requireLicenseAcceptance>

<version>$version$</version>

<id>Winch</id>
<title>Winch</title>
<authors>Hacktix, xen-42</authors>
<owners>xen-42</owners>
<description>A Harmony-based mod loader for the game Dredge.</description>
<license type="expression">MIT</license>
</metadata>
<files>
<file src="bin\Winch.dll" target="lib\net48" />
</files>
</package>
2 changes: 1 addition & 1 deletion Winch/mod_meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"Name": "Winch",
"Author": "Hacktix",
"ModGUID": "hacktix.winch",
"Version": "alpha-1.4"
"Version": "0.2.1"
}

0 comments on commit 9686910

Please sign in to comment.