diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 5dc643e..89cc2c4 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -5,4 +5,43 @@ jobs: build_arch: runs-on: archlinux steps: - - run: echo "This Works" + - name: Prepare Arch Environment + run: | + pacman -Syu --noconfirm + pacman -S --noconfirm base-devel git + useradd -m builder + chown -R builder:builder ./ + + - name: Checkout Current Repo + uses: actions/checkout@v4 + + - name: Clone External Repository + run: | + git clone https://git.elordenador.org/RedSocial/cli_archpkg.git external + - name: Makepkg + run: | + sudo -u builder bash -c "cd external && makepkg -s --noconfirm" + - name: Upload Artifact + uses: actions/upload-artifact@v4 + with: + name: arch-package + path: external/*.pkg.tar.zst + publish-release: + runs-on: ubuntu-latest + needs: build_arch + steps: + - name: Download Artifact + uses: actions/download-artifact@v4 + with: + name: arch-package + path: ./dist + - name: Create Release and Upload Assets + uses: https://github.com/softprops/action-gh-release@v1 + with: + files: ./dist/*.pkg.tar.zst + tag_name: ${{ github.ref_name }} + draft: false + prerelease: false + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} +