This repository has been archived on 2025-11-09. You can view files and clone it, but cannot push or open issues or pull requests.
Files
build-publish/action.yml

46 lines
1.3 KiB
YAML

name: Publish package
description: build and publish an Arch package
runs:
using: "composite"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Create publish script
shell: bash
run: |
echo "#!/bin/bash
echo '📤️ Uploading package to ${{ gitea.server_url }} ...'
if [ -z "\$username" ]
then
echo "NO USERNAME DETECTED"
else
echo "\$username , first letter \${username:0:1}"
fi
curl --user \"\$username:\$token\" \
--upload-file ./*.tar.zst \
'${{ gitea.server_url }}/api/packages/packages_test/arch/microverse'
" > "./post-entrypoint.sh"
chmod +x "./post-entrypoint.sh"
git config --global user.name 'Guy Incognito'
git config --global user.email 'user@local'
git add "./post-entrypoint.sh"
git commit -m "fuck you, gitea"
- name: sanity check
shell: bash
run: |
if [ -z "${{ secrets.USERNAME }}" ]; then
echo "❌ Secret not set!"
exit 1
else
echo "✅ Secret appears to be set."
fi
- name: Build package
uses: https://git.sanin.dev/packages_test/build-publish/@build
with:
username: "${{ secrets.USERNAME }}"
token: ${{ secrets.TOKEN }}