diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml new file mode 100644 index 0000000..3033a6f --- /dev/null +++ b/.github/workflows/changelog.yml @@ -0,0 +1,35 @@ +name: Changelog +on: + push: + branches: + - master + +jobs: + changelog: + runs-on: ubuntu-latest + permissions: + # Give the default GITHUB_TOKEN write permission to commit and push the + # added or changed files to the repository. + contents: write + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Setup config + run: | + git config --global user.name "Net9 Oy" + git config --global user.email "admin@net9.fi" + - name: Install deps + run: | + sudo apt-get install -y git-buildpackage + - name: Generate changelog + run: | + DEBEMAIL=admin@net9.fi gbp dch --release --full --id-length=7 --spawn-editor=never --git-author --dch-opt='-U' --distribution experimental + - uses: stefanzweifel/git-auto-commit-action@v5 + with: + commit_message: "Update changelog" + commit_options: "--no-verify --signoff" + - name: Tag release + run: | + gbp tag + git push --tags \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..a3e549d --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,26 @@ +name: release + +on: + push: + tags: + - '*' + +jobs: + changelog: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Install deps + run: | + sudo apt-get install -y debhelper + - name: Build release + run: | + make deb + echo "DEB_PATH=$(ls ../*.deb)" >> $GITHUB_ENV + - name: Upload release + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: ${{ env.DEB_PATH }} + tag: ${{ github.ref }} + overwrite: true \ No newline at end of file diff --git a/Makefile b/Makefile index 153603a..d3055c6 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,7 @@ all: deb: dh_clean - debuild -us -uc -i -b + debuild --no-lintian -i -us -uc -b install: install -D -m 0644 ./DRBDPlugin.pm.divert ${DESTDIR}$(PERLDIR)/PVE/Storage/DRBDPlugin.pm diff --git a/debian/compat b/debian/compat deleted file mode 100644 index ec63514..0000000 --- a/debian/compat +++ /dev/null @@ -1 +0,0 @@ -9 diff --git a/debian/control b/debian/control index 3aedd17..fbe4500 100644 --- a/debian/control +++ b/debian/control @@ -3,7 +3,7 @@ Maintainer: Net9 Oy Uploaders: Teemu Grönqvist Section: perl Priority: optional -Build-Depends: debhelper (>= 9) +Build-Depends: debhelper-compat (= 13) Standards-Version: 3.9.6 Package: proxmox-3par