Use publish script and update README

This commit is contained in:
Matt Nadareski
2024-12-06 11:23:53 -05:00
parent d7ac36029d
commit 7c428aedcf
4 changed files with 11 additions and 70 deletions

View File

@@ -1,53 +0,0 @@
name: Build and Publish
on:
push:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
project: [Headerer]
runtime: [win-x86, win-x64, win-arm64, linux-x64, linux-arm64, osx-x64]
framework: [net9.0] #[net20, net35, net40, net452, net472, net48, netcoreapp3.1, net5.0, net6.0, net7.0, net8.0, net9.0]
conf: [Debug] #[Release, Debug]
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet publish ${{ matrix.project }}/${{ matrix.project }}.csproj -f ${{ matrix.framework }} -r ${{ matrix.runtime }} -c ${{ matrix.conf }} --self-contained true --version-suffix ${{ github.sha }} ${{ (startsWith(matrix.framework, 'net5') || startsWith(matrix.framework, 'net6') || startsWith(matrix.framework, 'net7') || startsWith(matrix.framework, 'net8') || startsWith(matrix.framework, 'net9')) && '-p:PublishSingleFile=true' || ''}}
- name: Archive build
run: |
cd ${{ matrix.project }}/bin/${{ matrix.conf }}/${{ matrix.framework }}/${{ matrix.runtime }}/publish/
zip -r ${{ github.workspace }}/${{ matrix.project }}_${{ matrix.framework }}_${{ matrix.runtime }}_${{ matrix.conf }}.zip ./
- name: Upload build
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.project }}_${{ matrix.framework }}_${{ matrix.runtime }}_${{ matrix.conf }}
path: ${{ matrix.project }}_${{ matrix.framework }}_${{ matrix.runtime }}_${{ matrix.conf }}.zip
- name: Upload to rolling
uses: ncipollo/release-action@v1.14.0
with:
allowUpdates: True
artifacts: ${{ matrix.project }}_${{ matrix.framework }}_${{ matrix.runtime }}_${{ matrix.conf }}.zip
body: 'Last built commit: ${{ github.sha }}'
name: 'Rolling Release'
prerelease: True
replacesArtifacts: True
tag: "rolling"
updateOnlyUnreleased: True

View File

@@ -1,4 +1,4 @@
name: Nuget Pack
name: Build and Test
on:
push:
@@ -18,29 +18,23 @@ jobs:
with:
dotnet-version: 9.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build library
run: dotnet build
- name: Run tests
run: dotnet test
- name: Pack
run: dotnet pack
- name: Run publish script
run: ./publish-nix.sh
- name: Upload build
- name: Upload package
uses: actions/upload-artifact@v4
with:
name: 'Nuget Package'
path: 'SabreTools.Skippers/bin/Release/*.nupkg'
path: '*.nupkg'
- name: Upload to rolling
uses: ncipollo/release-action@v1.14.0
with:
allowUpdates: True
artifacts: 'SabreTools.Skippers/bin/Release/*.nupkg'
artifacts: "*.nupkg,*.zip"
body: 'Last built commit: ${{ github.sha }}'
name: 'Rolling Release'
prerelease: True

View File

@@ -1,13 +1,13 @@
# SabreTools.Skippers
[![Build and Test](https://github.com/SabreTools/SabreTools.Skippers/actions/workflows/build_and_test.yml/badge.svg)](https://github.com/SabreTools/SabreTools.Skippers/actions/workflows/build_and_test.yml)
This library comprises of code to perform copier header operations such as matching, manipulation, and removal. These are used for many older console-based systems and helps define known header skippers for immediate use.
Find the link to the Nuget package [here](https://www.nuget.org/packages/SabreTools.Skippers).
## Headerer
[![Build and Publish](https://github.com/SabreTools/SabreTools.Skippers/actions/workflows/build_and_publish.yml/badge.svg?branch=main)](https://github.com/SabreTools/SabreTools.Skippers/actions/workflows/build_and_publish.yml)
A small tool that allows users to extract, store, and remove copier headers for a variety of systems. Optionally, the stored headers can be replaced on the original files using a separate command. Each of the headers are stored in a Sqlite database file that links each header to the unheadered hash of the original file. The following copier header types are supported:
* Atari 7800
@@ -19,8 +19,8 @@ A small tool that allows users to extract, store, and remove copier headers for
* Super Nintendo Entertainment System / Super Famicom
* Super Nintendo Entertainment System / Super Famicom SPC music
## Builds
## Releases
Last stable releases can be found on [the Releases tab](https://github.com/SabreTools/SabreTools.Skippers/releases).
For the most recent stable build, download the latest release here: [Releases Page](https://github.com/SabreTools/SabreTools.Skippers/releases)
Latest unstable builds can be found on [the Rolling build](https://github.com/SabreTools/SabreTools.Skippers/releases/tag/rolling).
For the latest WIP build here: [Rolling Release](https://github.com/SabreTools/SabreTools.Skippers/releases/rolling)

0
publish-nix.sh Normal file → Executable file
View File