mlc/.gitea/workflows/release.yml

39 lines
1.2 KiB
YAML
Raw Normal View History

2023-10-10 16:24:46 +00:00
name: MLC Release workflow
run-name: ${{ gitea.actor }} is running MLC Release workflow on release ${{ gitea.event.release.tag_name }}
on:
release:
types: [published]
jobs:
Archlinux:
runs-on: archlinux
steps:
- name: Download the release tarball
2023-10-10 23:09:25 +00:00
run: curl -sL ${{ gitea.server_url }}/${{ gitea.repository }}/archive/${{ gitea.event.release.tag_name }}.tar.gz --output tarball.tar.gz
2023-10-10 16:24:46 +00:00
- name: Calculate SHA256 for the tarball
2023-10-10 23:00:59 +00:00
run: echo "tbSum=$(echo sha256sum tarball.tar.gz | cut -d " " -f 1" >> $GITHUB_ENV
2023-10-10 16:24:46 +00:00
- name: Unarchive tarball
2023-10-10 23:00:59 +00:00
run: tar -xvzf tarball.tar.gz
2023-10-10 16:24:46 +00:00
- name: Create a directory
run: mkdir aur
- name: Copy PKGBUILD to the directory
run: cp mlc/packaging/Archlinux/PKGBUILD aur/
- name: Put SHA256 sum to PKGBUILD file
working-directory: aur
run: sed -i "/sha256sums=/c\sha256sums=('${{ env.tbSum }}')" PKGBUILD
- name: create SRCINFO
working-directory: aur
run: makepkg --printsrcinfo > .SRCINFO
- name: Debug print PKGBUILD
run: cat aur/PKGBUILD
- name: Debug print .SRCINFO
run: cat aur/.SRCINFO