- Remove separate workflow for syncing releases to GitHub - Integrate release sync steps into the upload-assets workflow - Simplify workflow management and reduce duplication
57 lines
1.8 KiB
YAML
57 lines
1.8 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
|
|
|
|
- name: Run Releases Sync Action
|
|
uses: https://git.0xmax42.io/actions/releases-sync@main
|
|
with:
|
|
gitea_token: ${{ secrets.RELEASE_PUBLISH_TOKEN }}
|
|
gitea_url: https://git.0xmax42.io
|
|
gitea_owner: maxp
|
|
gitea_repo: systemd-timer
|
|
tag_name: ${{ github.event.release.tag_name }}
|
|
github_token: ${{ secrets.SYNC_GITHUB_TOKEN }}
|
|
github_owner: 0xmax42
|
|
github_repo: systemd-timer
|