Skip to content

Commit

Permalink
Merge pull request #4 from MegaPiggy/master
Browse files Browse the repository at this point in the history
Update to patch 15
  • Loading branch information
dgarroDC authored Jun 11, 2024
2 parents 9b23952 + 5167316 commit 2058124
Show file tree
Hide file tree
Showing 3 changed files with 93 additions and 8 deletions.
87 changes: 87 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
name: Create Release

on:
workflow_dispatch:
inputs:
prerelease:
description: Prerelease
type: boolean
bypassCheck:
description: Bypass Version Check
type: boolean

env:
PROJ_USERNAME: dgarro
PROJ_NAME: SuitLog

jobs:
pre_job:
name: Check For Other Releases
outputs:
version: ${{ steps.out.outputs.version }}
exists: ${{ steps.out.outputs.exists }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: "actions/checkout@v3"

- name: Fetch
run: git fetch

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

- name: Check For Release
id: check-tag
run: echo "exists=$(git ls-remote --exit-code --tags origin ${{ env.TAG }} >/dev/null 2>&1 && echo true || echo false)" >> $GITHUB_OUTPUT
env:
TAG: ${{fromJson(steps.read-manifest.outputs.manifest).version}}

- name: Output Version Info
id: out
run: |
echo "version=${{fromJson(steps.read-manifest.outputs.manifest).version}}" >> $GITHUB_OUTPUT
echo "exists=${{steps.check-tag.outputs.exists}}" >> $GITHUB_OUTPUT
- name: Error
if: ${{ steps.out.outputs.exists != 'false' && (!inputs.bypassCheck) }}
run: echo "::error file=manifest.json,title=Refusing to Release::Your mod was not released because there is already a release with the version in manifest.json"
release:
needs: pre_job
if: ${{ (needs.pre_job.outputs.version != '0.0.0') && (needs.pre_job.outputs.exists == 'false') || (inputs.bypassCheck) }}
name: Create Release
runs-on: windows-latest
steps:
- name: Checkout
uses: "actions/checkout@v3"

- name: Setup .NET
uses: "actions/setup-dotnet@v3"

- name: Remove .csproj.user
run: if (Test-Path ${{ env.PROJ_NAME }}/${{ env.PROJ_NAME }}.csproj.user) { rm ${{ env.PROJ_NAME }}/${{ env.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.PROJ_NAME }}/bin/Release"

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

- name: Create Release
uses: "ncipollo/release-action@v1"
with:
allowUpdates: true
commit: ${{ github.ref_name }}
tag: ${{ needs.pre_job.outputs.version }}
name: ${{ needs.pre_job.outputs.version }}
omitBodyDuringUpdate: true
artifacts: "${{ env.PROJ_USERNAME}}.${{ env.PROJ_NAME }}.zip"
draft: true
prerelease: ${{ inputs.prerelease }}
10 changes: 4 additions & 6 deletions SuitLog/SuitLog.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,16 @@
<PropertyGroup>
<TargetFramework>net48</TargetFramework>
<LangVersion>default</LangVersion>
<Copyright>Copyright © 2020</Copyright>
<Copyright>Copyright © 2022</Copyright>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
<CopyLocalLockFileAssemblies>false</CopyLocalLockFileAssemblies>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<DebugType>none</DebugType>
<DebugType>portable</DebugType>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="OWML" Version="2.4.0" />
<PackageReference Include="OuterWildsGameLibs" Version="1.1.14.768" />
<PackageReference Include="OWML" Version="2.13.0" />
<PackageReference Include="OuterWildsGameLibs" Version="1.1.15.1018" />
</ItemGroup>
<ItemGroup>
<None Include="default-config.json">
Expand Down
4 changes: 2 additions & 2 deletions SuitLog/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
"author": "Damián Garro",
"name": "Suit Log",
"uniqueName": "dgarro.SuitLog",
"version": "1.3.1",
"owmlVersion": "2.4.0"
"version": "1.4.0",
"owmlVersion": "2.13.0"
}

0 comments on commit 2058124

Please sign in to comment.