diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 92abc56..87ac86f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -25,7 +25,7 @@ jobs: linux: name: linux / ${{ matrix.target }} runs-on: ubuntu-latest - # needs: github + needs: github strategy: fail-fast: false matrix: @@ -206,7 +206,7 @@ jobs: id: get_tags run: | for tag in $(git tag --points-at HEAD); do - echo "${tag%-*}=${tag##*-}" >> "$GITHUB_OUTPUT" + echo "${tag%-*}=${tag##*-}" >>"$GITHUB_OUTPUT" done - uses: docker/build-push-action@v5 @@ -231,3 +231,48 @@ jobs: password: ${{ secrets.DOCKERHUB_TOKEN }} repository: fossable/goldboot + archlinux: + name: archlinux / ${{ matrix.package }} + runs-on: ubuntu-latest + needs: github + strategy: + matrix: + package: + - goldboot + - goldboot-registry + steps: + - uses: actions/checkout@v4 + with: + submodules: true + fetch-tags: true + + - name: Find version tags + id: get_tags + run: | + for tag in $(git tag --points-at HEAD); do + if [ "${tag%-*}" = "${{ matrix.package }}" ]; then + echo "pkgver=${tag##*-}" >>"$GITHUB_OUTPUT" + fi + done + + - uses: heyhusen/archlinux-package-action@v2 + with: + path: dist/pacman/${{ matrix.package }} + srcinfo: true + pkgver: ${{ steps.get_tags.outputs.pkgver }} + + - name: Push release to AUR + env: + AUR_PRIVATE_KEY: ${{ secrets.AUR_PRIVATE_KEY }} + run: | + echo "${AUR_PRIVATE_KEY}" >/tmp/id_rsa + chmod 600 /tmp/id_rsa + cd dist/pacman/${{ matrix.package }} + + git config --global user.name "github-actions" + git config --global user.email "10459406+cilki@users.noreply.github.com" + ssh-keyscan -H aur.archlinux.org >/tmp/known_hosts + + git add .SRCINFO PKGBUILD + git commit -m "release: ${{ steps.get_tags.outputs.pkgver }}" + GIT_SSH_COMMAND='ssh -i /tmp/id_rsa -o UserKnownHostsFile=/tmp/known_hosts' git push -u origin master diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..a6bc0e4 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,6 @@ +[submodule "dist/pacman/goldboot"] + path = dist/pacman/goldboot + url = ssh://aur@aur.archlinux.org/goldboot +[submodule "dist/pacman/goldboot-registry"] + path = dist/pacman/goldboot-registry + url = ssh://aur@aur.archlinux.org/goldboot-registry diff --git a/dist/pacman/goldboot b/dist/pacman/goldboot new file mode 160000 index 0000000..091712a --- /dev/null +++ b/dist/pacman/goldboot @@ -0,0 +1 @@ +Subproject commit 091712a868d704673d01559e592013a9b3fa5fb1 diff --git a/dist/pacman/goldboot-registry b/dist/pacman/goldboot-registry new file mode 160000 index 0000000..705a6b7 --- /dev/null +++ b/dist/pacman/goldboot-registry @@ -0,0 +1 @@ +Subproject commit 705a6b7fdb1aee28d00d7644a68d48f6411e54c8