🐛 Remove incorrect wgpu-git from PKGBUILD #22
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release-plz | |
permissions: | |
pull-requests: write | |
contents: write | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
release-plz: | |
name: Release-plz | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install Rust toolchain | |
uses: dtolnay/rust-toolchain@stable | |
- name: Run release-plz | |
uses: MarcoIeni/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} | |
publish-aur: | |
needs: release-plz | |
runs-on: ubuntu-latest | |
container: | |
image: archlinux:base-devel | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install git and gnupg | |
run: pacman -Syu --noconfirm git gnupg openssh | |
- name: Update PKGBUILD | |
run: | | |
version=$(grep '^version =' Cargo.toml | sed 's/.*= "\(.*\)"/\1/') | |
sed "s/pkgver=.*/pkgver=$version/" PKGBUILD.template > PKGBUILD | |
sum=$(curl -sL "https://crates.io/api/v1/crates/image-colorizer/$version/download" | sha256sum | cut -d ' ' -f 1) | |
sed -i "s/sha256sums=('PLACEHOLDER')/sha256sums=('$sum')/" PKGBUILD | |
- name: Generate .SRCINFO | |
run: | | |
mkdir /home/build | |
chgrp nobody /home/build | |
chmod g+ws /home/build | |
setfacl -m u::rwx,g::rwx /home/build | |
setfacl -d --set u::rwx,g::rwx,o::- /home/build | |
BUILDDIR=/home/build PKGDEST=/home/build SRCDEST=/home/build runuser -unobody makepkg -- --printsrcinfo > .SRCINFO | |
ls -a | |
- name: Import GPG key | |
env: | |
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} | |
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} | |
run: | | |
echo "$GPG_PRIVATE_KEY" | gpg --batch --import | |
echo "allow-loopback-pinentry" >> ~/.gnupg/gpg-agent.conf | |
echo "pinentry-mode loopback" >> ~/.gnupg/gpg.conf | |
echo "default-cache-ttl 34560000" >> ~/.gnupg/gpg-agent.conf | |
echo "max-cache-ttl 34560000" >> ~/.gnupg/gpg-agent.conf | |
echo "RELOADAGENT" | gpg-connect-agent | |
echo "$GPG_PASSPHRASE" | gpg --batch --passphrase-fd 0 --pinentry-mode loopback -s /dev/null | |
- name: Publish to AUR | |
env: | |
AUR_SSH_PRIVATE_KEY: ${{ secrets.AUR_SSH_PRIVATE_KEY }} | |
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} | |
run: | | |
mkdir -p /root/.ssh | |
chmod 700 /root/.ssh | |
echo "$AUR_SSH_PRIVATE_KEY" > /root/.ssh/aur | |
chmod 600 /root/.ssh/aur | |
eval $(ssh-agent -s) | |
ssh-add /root/.ssh/aur | |
ssh-keyscan -H aur.archlinux.org >> /root/.ssh/known_hosts | |
git config --global user.name "Taylor Beeston" | |
git config --global user.email "[email protected]" | |
git config --global user.signingkey $(gpg --list-secret-keys --keyid-format LONG | grep sec | awk '{print $2}' | cut -d'/' -f2) | |
git config --global commit.gpgsign true | |
git clone ssh://[email protected]/image-colorizer.git aur-repo | |
cp PKGBUILD .SRCINFO aur-repo/ | |
cd aur-repo | |
git add PKGBUILD .SRCINFO | |
git commit -S -m "Update to version $(grep -oP '(?<=pkgver=)\S+' PKGBUILD)" | |
git push |