From 7e3896bf2ac31a0cde2b29242ee83548e36d6870 Mon Sep 17 00:00:00 2001 From: Naxdy Date: Sun, 20 Oct 2024 15:26:40 +0200 Subject: [PATCH] ci: add release workflow + v0.4.0 notes --- .github/release_notes/v0.4.0.md | 17 ++++++++++ .github/workflows/check-flake.yml | 26 ++++++++++++++++ .github/workflows/release.yml | 52 +++++++++++++++++++++++++++++++ 3 files changed, 95 insertions(+) create mode 100644 .github/release_notes/v0.4.0.md create mode 100644 .github/workflows/check-flake.yml create mode 100644 .github/workflows/release.yml diff --git a/.github/release_notes/v0.4.0.md b/.github/release_notes/v0.4.0.md new file mode 100644 index 0000000..1c411ca --- /dev/null +++ b/.github/release_notes/v0.4.0.md @@ -0,0 +1,17 @@ +> [!NOTE] +> This build is compatible with version 13.0.3 of SSBU ONLY! + +This version introduces _no_ new functionality, but provides two versions of the plugin: + +- The standard one, named `liblatency_slider_de.nro`, which is functionally identical to `v0.3.2` +- A "classic" version, named `liblatency_slider_de_classic.nro` + +The "classic" version of the plugin is closer to the original latency slider in functionality: + +- You can only see and adjust your desired latency in arenas, D-pad inputs on any CSS are ignored. +- The latency you select in arenas carries over to all gamemodes, including quickplay / elite. + +The reason you'd pick classic over mainline is mod compatibility. Because it's much more barebones, it has a higher chance of being compatible with big, complex mods like the CSK collection. If you don't have any issues with mod compatibility however, there is no reason to use "classic" over the regular version. + +> [!NOTE] +> If you're using the regular latency slider, and don't plan on switching to the classic version, there is no reson to upgrade from `v0.3.2` to `v0.4.0`. diff --git a/.github/workflows/check-flake.yml b/.github/workflows/check-flake.yml new file mode 100644 index 0000000..a347101 --- /dev/null +++ b/.github/workflows/check-flake.yml @@ -0,0 +1,26 @@ +name: Nix CI + +on: pull_request + +concurrency: + group: "${{ github.head_ref }}" + cancel-in-progress: true + +jobs: + check: + name: "Check" + runs-on: ubuntu-latest + + permissions: + contents: read + id-token: write + + steps: + - uses: actions/checkout@v4 + + - uses: DeterminateSystems/nix-installer-action@main + - uses: DeterminateSystems/magic-nix-cache-action@main + + - name: Check + run: | + nix flake check --print-build-logs -j auto diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..e288c8d --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,52 @@ +name: Nix CD + +on: + push: + branches: + - "master" + +concurrency: + group: "${{ github.head_ref }}" + cancel-in-progress: true + +jobs: + check: + name: "Publish Stable Release" + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - uses: DeterminateSystems/nix-installer-action@main + - uses: DeterminateSystems/magic-nix-cache-action@main + + - name: Check + run: | + nix flake check --print-build-logs -j auto + + - name: "Determine release" + id: det-rel + run: | + version=$(nix flake eval .#packages.x86_64-linux.default.version --raw) + + if [$(git tag -l "$version")]; then + echo "releasever=$version" >> $GITHUB_OUTPUT + else + echo "releasever=none" >> $GITHUB_OUTPUT + fi + + - name: "Build Release" + if: steps.det-rel.outputs.releasever != 'none' + run: | + nix build .# --print-build-logs -j auto + nix build .#latency-slider-de-classic --print-build-logs -j auto -o result-classic + + - name: "Publish Release" + if: steps.det-rel.outputs.releasever != 'none' + uses: ncipollo/release-action@v1.14.0 + with: + artifacts: "result/lib/*.nro,result-classic/lib/*.nro" + bodyFile: ".github/release_notes/v${{ steps.det-rel.outputs.releasever }}.md" + name: "v${{ steps.det-rel.outputs.releasever }}" + commit: "${{ github.head_ref }}" + tag: "v${{ steps.det-rel.outputs.releasever }}"