Fix sha256 verification for ARM64 binaries #17
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Rolling Release Binaries | |
on: | |
push: | |
branches: | |
- master | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
strategy: | |
matrix: | |
target: | |
- x86_64-pc-windows-msvc | |
- x86_64-apple-darwin | |
- aarch64-apple-darwin | |
- x86_64-unknown-linux-gnu | |
- aarch64-unknown-linux-gnu | |
steps: | |
- name: Setup repo | |
uses: actions/checkout@v5 | |
with: | |
fetch-depth: 0 | |
- name: Setup Deno | |
uses: denoland/setup-deno@v2 | |
with: | |
deno-version: v2.x | |
- name: Set binary name | |
id: binary-name | |
run: | | |
case "${{ matrix.target }}" in | |
*-windows-*) | |
echo "name=invidious_companion.exe" >> $GITHUB_OUTPUT | |
echo "archive_name=invidious_companion-${{ matrix.target }}.zip" >> $GITHUB_OUTPUT | |
;; | |
*) | |
echo "name=invidious_companion" >> $GITHUB_OUTPUT | |
echo "archive_name=invidious_companion-${{ matrix.target }}.tar.gz" >> $GITHUB_OUTPUT | |
;; | |
esac | |
- name: Build binary | |
run: | | |
deno compile \ | |
--include ./src/lib/helpers/youtubePlayerReq.ts \ | |
--include ./src/lib/helpers/getFetchClient.ts \ | |
--allow-import=github.com:443,jsr.io:443,cdn.jsdelivr.net:443,esm.sh:443,deno.land:443 \ | |
--allow-net --allow-env --allow-read --allow-sys=hostname \ | |
--allow-write=/var/tmp/youtubei.js,/tmp/invidious-companion.sock \ | |
--target=${{ matrix.target }} \ | |
--output ${{ steps.binary-name.outputs.name }} \ | |
src/main.ts \ | |
--_version_date="$(git log -1 --format=%ci | awk '{print $1}' | sed s/-/./g)" \ | |
--_version_commit="$(git rev-list HEAD --max-count=1 --abbrev-commit)" | |
- name: Create archive | |
run: | | |
case "${{ matrix.target }}" in | |
*-windows-*) | |
zip "${{ steps.binary-name.outputs.archive_name }}" "${{ steps.binary-name.outputs.name }}" | |
;; | |
*) | |
tar -czf "${{ steps.binary-name.outputs.archive_name }}" "${{ steps.binary-name.outputs.name }}" | |
;; | |
esac | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: binary-${{ matrix.target }} | |
path: ${{ steps.binary-name.outputs.archive_name }} | |
retention-days: 90 | |
release: | |
runs-on: ubuntu-latest | |
needs: build | |
permissions: | |
contents: write | |
steps: | |
- name: Download all artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
path: artifacts | |
- uses: ncipollo/release-action@v1 | |
with: | |
tag: ${{ github.ref_name }} | |
removeArtifacts: true | |
allowUpdates: true | |
artifacts: artifacts/** | |
body: | | |
Binaries from ${{ github.ref_name }} branch. |