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
|
|
|
|
2023-10-10 23:48:38 +00:00
|
|
|
- name: Debug output
|
2023-10-11 00:28:06 +00:00
|
|
|
run: echo ${{ gitea.ref }}
|
2023-10-10 23:48:38 +00:00
|
|
|
|
2023-10-10 16:24:46 +00:00
|
|
|
- name: Calculate SHA256 for the tarball
|
2023-10-10 23:48:38 +00:00
|
|
|
run: echo "tbSum=$(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
|
|
|
|
|
2023-10-11 00:28:06 +00:00
|
|
|
- name: Release permissions
|
|
|
|
run: chmod 777 aur
|
|
|
|
|
2023-10-10 16:24:46 +00:00
|
|
|
- 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
|
2023-10-11 00:28:06 +00:00
|
|
|
run: sudo -u build makepkg --printsrcinfo > .SRCINFO
|
2023-10-10 16:24:46 +00:00
|
|
|
|
|
|
|
- name: Debug print PKGBUILD
|
|
|
|
run: cat aur/PKGBUILD
|
|
|
|
|
|
|
|
- name: Debug print .SRCINFO
|
|
|
|
run: cat aur/.SRCINFO
|