Skip to content

Commit

Permalink
ci: add dedicated cargo home for arch package build
Browse files Browse the repository at this point in the history
- Add separate cargo directory to prevent permission issues
- Set CARGO_HOME env var during makepkg execution
  • Loading branch information
aljen committed Dec 1, 2024
1 parent 054411e commit 70c6a9f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -186,15 +186,15 @@ jobs:
run: |
VERSION=$(grep -m1 'version =' Cargo.toml | cut -d '"' -f2)
sed -i "s/pkgver=.*/pkgver=$VERSION/" dist/arch/PKGBUILD
mkdir -p /tmp/pkg/src
mkdir -p /tmp/pkg/{cargo,src}
cp -r . /tmp/pkg/src/modbus-relay
cp dist/arch/PKGBUILD /tmp/pkg
- name: Build package
run: |
cd /tmp/pkg
chown -R nobody:nobody .
runuser -p -u nobody -g root -- makepkg -s --noconfirm
CARGO_HOME=/tmp/pkg/cargo runuser -p -u nobody -g root -- makepkg -s --noconfirm
- name: Upload artifacts
uses: actions/upload-artifact@v4
Expand Down

0 comments on commit 70c6a9f

Please sign in to comment.