cicpoffs/.github/workflows/push.yaml

58 lines
2.1 KiB
YAML

name: Build and push release
run-name: Building binaries and updating release artifacts
on:
push:
branches:
- master
jobs:
Build_for_DEB:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: "sudo apt update"
- run: "sudo apt install -y gcc g++ autotools-dev fuse3 libfuse-dev libfuse3-dev libattr1-dev alien"
- run: "mkdir -p packaging/debian/usr/bin"
- run: "make cicpoffs"
- run: "cp cicpoffs packaging/debian/usr/bin/cicpoffs"
- run: "chmod 0755 packaging/debian/usr/bin/cicpoffs"
- run: "ln -s cicpoffs packaging/debian/usr/bin/mount.cicpoffs"
- run: "dpkg-deb --build packaging/debian"
- run: "cp packaging/debian.deb packaging/cicpoffs.deb"
- run: "cd packaging; sudo alien -r -c -v debian.deb; cd .."
- run: "cd packaging; mv $(ls -1 | grep cicpoffs | grep rpm | head -1) debian.rpm; cd .."
- run: "cp packaging/debian.rpm packaging/cicpoffs.rpm"
- uses: actions/upload-artifact@v3
with:
name: cicpoffs.deb
path: packaging/debian.deb
- uses: actions/upload-artifact@v3
with:
name: cicpoffs.rpm
path: packaging/debian.rpm
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: packaging/cicpoffs.*
tag: ${{ github.ref }}
overwrite: true
file_glob: true
Build_for_ARCH:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: "docker run --rm -v ./:/repo archlinux /bin/bash /repo/packaging/arch/bash.sh"
- run: "sudo cp packaging/arch/cicpoffs.tar.zst packaging/cicpoffs.tar.zst"
- uses: actions/upload-artifact@v3
with:
name: cicpoffs.tar.zst
path: packaging/arch/cicpoffs.tar.zst
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: packaging/cicpoffs.tar.zst
tag: ${{ github.ref }}
overwrite: true
file_glob: true