From 3df5a858f528b668d8f7e9b4f64b0679dbab8523 Mon Sep 17 00:00:00 2001 From: Zoe Roux Date: Sun, 4 Apr 2021 23:19:47 +0200 Subject: [PATCH 1/5] Adding install scripts for debian. --- .github/workflows/release.yml | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a1d7414b..093833e3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -52,10 +52,13 @@ jobs: - name: Create the package structure run: | mkdir -p pkg/usr/lib/ + mkdir -p pkg/DEBIAN cp -r --no-preserve ownership dist pkg/usr/lib/kyoo install -Dm 644 deployment/kyoo.service -t pkg/usr/lib/systemd/system/ install -Dm 644 deployment/kyoo.sysusers pkg/usr/lib/sysusers.d/kyoo.conf install -Dm 644 deployment/kyoo.tmpfiles pkg/usr/lib/tmpfiles.d/kyoo.conf + install -Dm 755 deployment/postinst -t pkg/DEBIAN/ + install -Dm 755 deployment/postrm -t pkg/DEBIAN/ - uses: jiro4989/build-rpm-action@v2 with: package: kyoo @@ -63,6 +66,7 @@ jobs: maintainer: Zoe Roux version: ${{env.version}} arch: x86_64 +# requires: postgresql-server desc: ${{env.description}} summary: ${{env.description}} - uses: jiro4989/build-deb-action@v2 @@ -71,30 +75,29 @@ jobs: package_root: pkg maintainer: Zoe Roux version: ${{env.version}} + depends: postgresql arch: amd64 desc: ${{env.description}} - name: Prepare arch package - run: cp -r pkg deployment/output + run: | + mkdir deployment/output + cp -a pkg/usr deployment/output/usr - uses: edlanglois/pkgbuild-action@v1 + id: makepkg with: pkgdir: deployment makepkgArgs: -p PKGBUILD.github - uses: actions/upload-artifact@v2 with: - name: kyoo-rpm path: | ./*.rpm !./*-debuginfo-*.rpm - uses: actions/upload-artifact@v2 with: - name: kyoo-deb - path: | - ./*.deb + path: ./*.deb - uses: actions/upload-artifact@v2 with: - name: kyoo-arch - path: | - ./*.pkg.tar.zst + path: ${{steps.makepkg.outputs.pkgfile0}} # new-version: # if: startsWith(github.ref, 'refs/tags/v') From 810bb7cad7e53ac767335b1bed1e3ca5fe94ebf8 Mon Sep 17 00:00:00 2001 From: Zoe Roux Date: Mon, 5 Apr 2021 00:21:33 +0200 Subject: [PATCH 2/5] Replacing the PKGBUILD in the CI. --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 093833e3..02645197 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -81,12 +81,12 @@ jobs: - name: Prepare arch package run: | mkdir deployment/output + mv deployment/PKGBUILD.github deployment/PKGBUILD cp -a pkg/usr deployment/output/usr - uses: edlanglois/pkgbuild-action@v1 id: makepkg with: pkgdir: deployment - makepkgArgs: -p PKGBUILD.github - uses: actions/upload-artifact@v2 with: path: | From 1daaf620a5d894e2dd7e09d70794d007fd9106e9 Mon Sep 17 00:00:00 2001 From: Zoe Roux Date: Mon, 5 Apr 2021 18:43:10 +0200 Subject: [PATCH 3/5] Disabling namecap --- .github/workflows/release.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 02645197..8d47d341 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,7 +7,7 @@ on: jobs: build: - name: Builf for ${{matrix.artifact}} + name: Build for ${{matrix.artifact}} runs-on: ${{matrix.os}} strategy: matrix: @@ -37,7 +37,7 @@ jobs: path: dist/* release: - name: Create debian & rpm releases + name: Create debian, rpm & arch releases runs-on: ubuntu-latest needs: build env: @@ -87,6 +87,7 @@ jobs: id: makepkg with: pkgdir: deployment + namcapDisable: true - uses: actions/upload-artifact@v2 with: path: | From 418e32c3de0f659e6b66d72b164449fbdad9bd50 Mon Sep 17 00:00:00 2001 From: Zoe Roux Date: Mon, 5 Apr 2021 19:57:24 +0200 Subject: [PATCH 4/5] Zipping content after build to keep execution bits --- .github/workflows/release.yml | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8d47d341..ec51be6f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -31,10 +31,20 @@ jobs: dotnet-version: 5.0.x - name: Build the app run: dotnet publish -r ${{matrix.runtime}} -c Release -o dist Kyoo + - name: Compression output + run: | + assets=kyoo_${{matrix.artifact}} + if [[ "${{runner.os}}" == "Windows" ]]; then + 7z a "$assets.zip" dist + else + tar czf "$assets.tar.gz" dist + fi - uses: actions/upload-artifact@v2 with: name: kyoo_${{matrix.artifact}} - path: dist/* + path: | + *.zip + *.tar.gz release: name: Create debian, rpm & arch releases @@ -48,7 +58,9 @@ jobs: - uses: actions/download-artifact@v2 with: name: kyoo_linux - path: dist + path: dist.tar.gz + - name: Unzip the published files. + run: mkdir dist && tar -C dist -xzf dist.tar.gz dist - name: Create the package structure run: | mkdir -p pkg/usr/lib/ @@ -90,14 +102,17 @@ jobs: namcapDisable: true - uses: actions/upload-artifact@v2 with: + name: kyoo_rpm path: | ./*.rpm !./*-debuginfo-*.rpm - uses: actions/upload-artifact@v2 with: + name: kyoo_debian path: ./*.deb - uses: actions/upload-artifact@v2 with: + name: kyoo_arch path: ${{steps.makepkg.outputs.pkgfile0}} # new-version: From 94e70371e17c45138adc6fff1a7a878de4a5f09a Mon Sep 17 00:00:00 2001 From: Zoe Roux Date: Mon, 5 Apr 2021 20:52:36 +0200 Subject: [PATCH 5/5] Fixing tar --- .github/workflows/release.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ec51be6f..55483610 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -32,12 +32,13 @@ jobs: - name: Build the app run: dotnet publish -r ${{matrix.runtime}} -c Release -o dist Kyoo - name: Compression output + shell: bash run: | assets=kyoo_${{matrix.artifact}} if [[ "${{runner.os}}" == "Windows" ]]; then - 7z a "$assets.zip" dist + cd dist && 7z a "../$assets.zip" else - tar czf "$assets.tar.gz" dist + tar -C dist -czf "$assets.tar.gz" . fi - uses: actions/upload-artifact@v2 with: @@ -58,9 +59,9 @@ jobs: - uses: actions/download-artifact@v2 with: name: kyoo_linux - path: dist.tar.gz + path: artifact - name: Unzip the published files. - run: mkdir dist && tar -C dist -xzf dist.tar.gz dist + run: mkdir dist && tar -C dist -xzf artifact/kyoo_linux.tar.gz - name: Create the package structure run: | mkdir -p pkg/usr/lib/