- Introduce matrix strategy for building and uploading binaries for multiple architectures (amd64, arm64). - Generate SHA256 checksum files for release binaries. - Upload both binaries and their corresponding SHA256 files as release assets for better integrity verification.
45 lines
1.4 KiB
YAML
45 lines
1.4 KiB
YAML
name: Upload Assets
|
|
|
|
on:
|
|
release:
|
|
types: [published]
|
|
|
|
jobs:
|
|
upload-assets:
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
matrix:
|
|
include:
|
|
- target: linux
|
|
arch: amd64
|
|
- target: linux
|
|
arch: arm64
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
ref: ${{ github.event.release.tag_name }}
|
|
fetch-depth: 0
|
|
|
|
- name: Get Release ID from tag
|
|
run: .gitea/scripts/get-release-id.sh "${{ github.event.release.tag_name }}"
|
|
|
|
- uses: denoland/setup-deno@v2
|
|
with:
|
|
deno-version: v2.x
|
|
|
|
- name: Build ${{ matrix.target }}-${{ matrix.arch }}
|
|
run: deno task build:${{ matrix.arch }}
|
|
|
|
- name: Generate SHA256 for ${{ matrix.target }}-${{ matrix.arch }}
|
|
run: |
|
|
FILE="./dist/systemd-timer-${{ matrix.target }}-${{ matrix.arch }}"
|
|
sha256sum "$FILE" > "$FILE.sha256"
|
|
|
|
- name: Upload binary for ${{ matrix.target }}-${{ matrix.arch }}
|
|
run: .gitea/scripts/upload-asset.sh ./dist/systemd-timer-${{ matrix.target }}-${{ matrix.arch }} systemd-timer-${{ matrix.target }}-${{ matrix.arch }}
|
|
|
|
- name: Upload SHA256 for ${{ matrix.target }}-${{ matrix.arch }}
|
|
run: .gitea/scripts/upload-asset.sh ./dist/systemd-timer-${{ matrix.target }}-${{ matrix.arch }}.sha256 systemd-timer-${{ matrix.target }}-${{ matrix.arch }}.sha256
|