diff options
-rw-r--r-- | .github/workflows/build.yml | 34 | ||||
-rw-r--r-- | .github/workflows/docs.yml | 3 | ||||
-rw-r--r-- | NesContainers.csproj | 7 | ||||
-rw-r--r-- | UnifFile.cs | 2 |
4 files changed, 43 insertions, 3 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..1a543d6 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,34 @@ +name: Build and pack + +on: + # Runs on pushes targeting the default branch + push: + branches: ["master"] + pull_request: + branches: [ master ] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +jobs: + # Single deploy job since we're just deploying + build: + environment: + APP_NAME: nes-containers + PROJECT_PATH: ./nes-containers + OUTPUT_DIR: output + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Setup .NET + uses: actions/setup-dotnet@v2 + with: + dotnet-version: 6.0.x + - name: Build + run: dotnet pack ${{ env.OUTPUT_DIR }} + - name: Upload artifact + uses: actions/upload-artifact@v3 + with: + name: ${{ env.APP_NAME }} + path: ${{ env.OUTPUT_DIR }} diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index ea6b64f..39452e2 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -1,5 +1,4 @@ -# Simple workflow for deploying static content to GitHub Pages -name: Deploy static content to Pages +name: Deploy documentation on: # Runs on pushes targeting the default branch diff --git a/NesContainers.csproj b/NesContainers.csproj index fee36c1..d047771 100644 --- a/NesContainers.csproj +++ b/NesContainers.csproj @@ -18,4 +18,11 @@ <DocumentationFile>NesContainers.xml</DocumentationFile>
<PackageReadmeFile>README.md</PackageReadmeFile>
</PropertyGroup>
+
+ <ItemGroup>
+ <None Update="README.md">
+ <Pack>True</Pack>
+ <PackagePath>\</PackagePath>
+ </None>
+ </ItemGroup>
</Project>
diff --git a/UnifFile.cs b/UnifFile.cs index f794d2d..921edec 100644 --- a/UnifFile.cs +++ b/UnifFile.cs @@ -41,7 +41,7 @@ namespace com.clusterrr.Famicom.Containers if (value == null && fields.ContainsKey(key))
fields.Remove(key);
else
- fields[key] = value.ToArray();
+ fields[key] = (value ?? new byte[0]).ToArray();
}
}
|