diff --git a/.github/actions/makepkg/Dockerfile b/.github/actions/makepkg/Dockerfile index e513c79..b21973d 100644 --- a/.github/actions/makepkg/Dockerfile +++ b/.github/actions/makepkg/Dockerfile @@ -2,12 +2,11 @@ FROM archlinux:base-devel RUN pacman -Syu --needed --noconfirm git -RUN groupadd -f -r wheel -RUN useradd -d /builder -m builder +RUN useradd -m builder RUN echo "builder ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers USER builder -WORKDIR /builder +WORKDIR /home/builder COPY entrypoint.sh /entrypoint.sh diff --git a/.github/actions/makepkg/entrypoint.sh b/.github/actions/makepkg/entrypoint.sh index 5464fa5..9cba3d4 100755 --- a/.github/actions/makepkg/entrypoint.sh +++ b/.github/actions/makepkg/entrypoint.sh @@ -2,13 +2,11 @@ set -eu -if [ -d "/github" ]; then - sudo chown -R builder /github/workspace /github/home -fi - sudo sed -i '/^CFLAGS=/ s/-march=x86-64 -mtune=generic/-march='"${INPUT_ARCH}"'/' /etc/makepkg.conf +sudo sed -i '/^options=(/ s/\bdebug\b/!debug/' /etc/makepkg.conf sudo sed -i 's/#MAKEFLAGS="-j2"/MAKEFLAGS="-j$(nproc)"/' /etc/makepkg.conf +sudo chown -R builder /github/workspace /github/home mkdir -p pkgs cd "${INPUT_PKG}" diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4dc677b..f6798c1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,26 +9,26 @@ jobs: pkg: [battery-notifications, cdns, gammastep, networkd-notify-git, pacfilter, python-mapbox-earcut, yacd] steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Build uses: ./.github/actions/makepkg with: arch: znver2 pkg: ${{ matrix.pkg }} - name: Archive packages - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: packages + name: ${{ matrix.pkg }} path: pkgs/ release: runs-on: ubuntu-latest needs: - build steps: - - uses: actions/download-artifact@master + - uses: actions/download-artifact@v4 with: - name: packages path: pkgs/ + merge-multiple: true - uses: dev-drprasad/delete-tag-and-release@v1.1 with: delete_release: true @@ -36,11 +36,12 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Release - uses: ncipollo/release-action@v1.12.0 + uses: ncipollo/release-action@v1 with: tag: latest name: Optimized packages for AMD Zen 2 omitBody: true commit: ${{ github.sha }} - artifacts: "pkgs/*.pkg.tar.zst" + artifacts: "pkgs/*" + draft: false token: ${{ secrets.GITHUB_TOKEN }}