fix folder workflows #22
Workflow file for this run
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 | |
on: | |
push: | |
tags: | |
- "v*.*.*" | |
jobs: | |
debian: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Build DEB | |
run: | | |
mkdir setuper_${{ github.ref_name }} | |
mkdir setuper_${{ github.ref_name }}/DEBIAN | |
mkdir setuper_${{ github.ref_name }}/usr | |
mkdir setuper_${{ github.ref_name }}/usr/lib/ | |
mkdir setuper_${{ github.ref_name }}/usr/bin/ | |
mv build/debian/control setuper_${{ github.ref_name }}/DEBIAN/control | |
mv setuper setuper_${{ github.ref_name }}/usr/bin/ | |
mv lib/ setuper_${{ github.ref_name }}/usr/lib/setuper | |
dpkg-deb --build setuper_${{ github.ref_name }} | |
- name: Upload DEB | |
uses: softprops/action-gh-release@v2 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: setuper_${{ github.ref_name }}.deb | |
arch: | |
runs-on: ubuntu-latest | |
container: | |
image: archlinux:base-devel | |
volumes: | |
- ./build/arch:/build | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Build arch | |
run: | | |
mkdir -p ./build/arch/src | |
cp setuper ./build/arch/src | |
cp -r lib/*.sh ./build/arch/src | |
echo "Entering build directory" | |
cd /build | |
echo "Setup user" | |
useradd --no-create-home build | |
echo "show passwd" | |
cat /etc/passwd | |
echo "Setting permissions" | |
chown -R build:build ./ | |
echo "Setting permissions for everyone" | |
chmod -R 777 ./ | |
echo "Switching to build user" | |
su build | |
echo "Current user is: $(whoami)" | |
echo "Building package" | |
sudo -u build makepkg | |
- name: Upload arch | |
uses: softprops/action-gh-release@v2 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: ./build/arch/setuper_${{ github.ref_name }}-1-any.pkg.tar.zst |