Add minisign signing for release

This commit is contained in:
2024-10-05 17:13:08 -05:00
parent ca97ae2e15
commit 6599f58933
2 changed files with 23 additions and 0 deletions

View File

@@ -34,6 +34,7 @@ env:
jobs: jobs:
build: build:
environment: production
strategy: strategy:
fail-fast: ${{ startsWith(github.ref, 'refs/tags/') || github.event.inputs.fail_fast == 'true' }} fail-fast: ${{ startsWith(github.ref, 'refs/tags/') || github.event.inputs.fail_fast == 'true' }}
@@ -140,6 +141,23 @@ jobs:
path: | path: |
spotify-quickauth.exe spotify-quickauth.exe
- name: Install rsign2
uses: taiki-e/install-action@v2
with:
tool: rsign2
- name: Sign Archive
env:
ARCHIVE_PATH: ${{ env.ARCHIVE_DIR }}/${{ env.ARCHIVE }}
run: |
echo "{{ secrets.MINISIGN_KEY }}" > minisign.key
ts=$(node -e 'console.log((new Date).toISOString())')
git=$(git rev-parse HEAD)
comment="gh=$GITHUB_REPOSITORY git=$git ts=$ts run=$GITHUB_RUN_ID"
rsign sign -W -s minisign.key -x "${{ env.ARCHIVE_PATH }}.sig" -t "$comment" "${{ env.ARCHIVE_PATH }}"
- name: Upload Artifact - name: Upload Artifact
if: ${{ !startsWith(github.ref, 'refs/tags/') }} if: ${{ !startsWith(github.ref, 'refs/tags/') }}
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
@@ -155,6 +173,7 @@ jobs:
with: with:
files: | files: |
${{ env.ARCHIVE_DIR }}/${{ env.ARCHIVE }} ${{ env.ARCHIVE_DIR }}/${{ env.ARCHIVE }}
${{ env.ARCHIVE_DIR }}/${{ env.ARCHIVE }}.sig
generate_release_notes: true generate_release_notes: true
- name: cargo login - name: cargo login

View File

@@ -10,6 +10,10 @@ repository = "https://github.com/Xevion/spotify-quickauth"
license = "MIT OR Apache-2.0" license = "MIT OR Apache-2.0"
readme = "CARGO_README.md" readme = "CARGO_README.md"
[package.metadata.binstall.signing]
algorithm = "minisign"
pubkey = "RWR4y+tYx6jem6tVD60RsR/P8fNm+KBT0b4wxTY0a4L/8cN3R85KXyPi"
[dependencies] [dependencies]
librespot-discovery = { version = "0.4.2" } librespot-discovery = { version = "0.4.2" }
librespot-core = { version = "0.4.2" } librespot-core = { version = "0.4.2" }