1 sub-directory [1 image file] #752
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: Debian Package packager | |
on: | |
push: | |
paths-ignore: | |
- 'LICENSE' | |
- 'README.*' | |
pull_request: | |
paths-ignore: | |
- 'LICENSE' | |
- 'README.*' | |
jobs: | |
test-script: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
desc: | |
- 'test package' | |
- '' | |
steps: | |
- uses: actions/checkout@v2 | |
- run: | | |
mkdir -p .debpkg/usr/bin | |
mkdir -p .debpkg/usr/lib/testbin | |
echo -e "echo hello" > .debpkg/usr/bin/testbin | |
echo -e "echo hello2" > .debpkg/usr/bin/testbin2 | |
echo -e "a=1" > .debpkg/usr/lib/testbin/testbin.conf | |
chmod +x .debpkg/usr/bin/* | |
- uses: ./ | |
with: | |
package: testbin | |
package_root: .debpkg | |
maintainer: jiro4989 | |
version: 'v1.0.0' | |
arch: 'amd64' | |
desc: "${{ matrix.desc }}" | |
if: matrix.desc != '' | |
- uses: ./ | |
with: | |
package: testbin | |
package_root: .debpkg | |
maintainer: jiro4989 | |
version: 'v1.0.0' | |
arch: 'amd64' | |
if: matrix.desc == '' | |
- name: install deb package | |
run: sudo dpkg -i *.deb | |
- name: check files | |
run: | | |
which testbin | |
testbin | |
which testbin2 | |
testbin2 | |
find /usr/lib/testbin/ | |
cat /usr/lib/testbin/testbin.conf | |
test-github-ref-version: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- run: | | |
mkdir -p .debpkg/usr/bin | |
mkdir -p .debpkg/usr/lib/testbin | |
echo -e "echo hello" > .debpkg/usr/bin/testbin | |
echo -e "echo hello2" > .debpkg/usr/bin/testbin2 | |
echo -e "a=1" > .debpkg/usr/lib/testbin/testbin.conf | |
chmod +x .debpkg/usr/bin/* | |
- uses: ./ | |
with: | |
package: testbin | |
package_root: .debpkg | |
maintainer: jiro4989 | |
version: 'refs/tags/v1.0.0' | |
arch: 'amd64' | |
desc: 'test package' | |
- name: install deb package | |
run: sudo dpkg -i *.deb | |
- name: check files | |
run: | | |
which testbin | |
testbin | |
which testbin2 | |
testbin2 | |
find /usr/lib/testbin/ | |
cat /usr/lib/testbin/testbin.conf | |
test-nim-package: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: jiro4989/setup-nim-action@v1 | |
- run: | | |
git clone https://github.com/jiro4989/nimjson app | |
( | |
cd app | |
nimble build -Y | |
cp bin/nimjson ../ | |
) | |
rm -rf app | |
mkdir -p .debpkg/usr/bin | |
mv nimjson .debpkg/usr/bin/ | |
- uses: ./ | |
with: | |
package: nimjson | |
package_root: .debpkg | |
maintainer: jiro4989 | |
version: 'v1.0.0' | |
arch: 'amd64' | |
desc: 'test package' | |
- run: sudo dpkg -i *.deb | |
- run: which nimjson | |
- run: nimjson -h | |
- run: dpkg -s nimjson | |
test-postinst: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- run: | | |
mkdir -p .debpkg/usr/bin | |
mkdir -p .debpkg/usr/lib/testbin | |
echo -e "echo hello" > .debpkg/usr/bin/testbin | |
echo -e "echo hello2" > .debpkg/usr/bin/testbin2 | |
echo -e "a=1" > .debpkg/usr/lib/testbin/testbin.conf | |
mkdir -p .debpkg/DEBIAN | |
cat << E > .debpkg/DEBIAN/postinst | |
#!/bin/bash | |
set -eu | |
echo postinst $@ | |
E | |
chmod +x .debpkg/DEBIAN/postinst | |
chmod +x .debpkg/usr/bin/* | |
- uses: ./ | |
with: | |
package: testbin | |
package_root: .debpkg | |
maintainer: jiro4989 | |
version: 'v1.0.0' | |
arch: 'amd64' | |
desc: 'test package' | |
- name: install deb package | |
run: sudo dpkg -i *.deb | |
- name: check files | |
run: | | |
which testbin | |
testbin | |
which testbin2 | |
testbin2 | |
find /usr/lib/testbin/ | |
cat /usr/lib/testbin/testbin.conf | |
test-depends: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: jiro4989/setup-nim-action@v1 | |
- run: | | |
git clone https://github.com/jiro4989/nimjson app | |
( | |
cd app | |
nimble build -Y | |
cp bin/nimjson ../ | |
) | |
rm -rf app | |
mkdir -p .debpkg/usr/bin | |
mv nimjson .debpkg/usr/bin/ | |
- uses: ./ | |
with: | |
package: nimjson | |
package_root: .debpkg | |
maintainer: jiro4989 | |
version: 'v1.0.0' | |
depends: 'libc6 (>= 2.2.1), git' | |
arch: 'amd64' | |
desc: 'test package' | |
- run: sudo dpkg -i *.deb | |
- run: which nimjson | |
- run: nimjson -h | |
- run: dpkg -s nimjson |