Skip to content

Commit

Permalink
Add build pipeline for deb-pkgs
Browse files Browse the repository at this point in the history
Pipelines regarding the build process of deb-pkgs are now part of the
main BashPass repo, instead of having its own "BasPass-DEB". This
simplifies the release of newer versions, because of the auto-trigger
when a new tag is made, indicating a new release.

Since git(1), wl-clipboard(1) and other clipboard managers are not a
hard dependeny, they will have to be installed separately. This also
makes packageing much easier, since we can ignore xorg and wayland.
  • Loading branch information
AntonVanAssche committed Apr 22, 2024
1 parent 82b0db3 commit 32519f2
Show file tree
Hide file tree
Showing 6 changed files with 75 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/pkgs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Build Packages

on:
push:
tags:
- '*'

jobs:
build-deb:
runs-on: ubuntu-latest

steps:
- name: Set env
run: |
printf 'RELEASE_VERSION=%s' "${GITHUB_REF#refs/*/v}" >> ${GITHUB_ENV}
- uses: actions/checkout@v3
with:
path: bashpass-${{ env.RELEASE_VERSION }}
ref: refs/tags/v${{env.RELEASE_VERSION }}

- name: Build DEB
run: |
/usr/bin/sed -i "s/RELEASE_VERSION/${{ env.RELEASE_VERSION }}/" bashpass-${{ env.RELEASE_VERSION }}/pkgs/deb/DEBIAN/control
/usr/bin/mkdir -pv bashpass-${{ env.RELEASE_VERSION }}/pkgs/deb/usr/bin
/usr/bin/mkdir -pv bashpass-${{ env.RELEASE_VERSION }}/pkgs/deb/usr/share/man/man1
/usr/bin/cp -rv bashpass-${{ env.RELEASE_VERSION }}/bashpass bashpass-${{ env.RELEASE_VERSION }}/pkgs/deb/usr/bin/
/usr/bin/cp -rv bashpass-${{ env.RELEASE_VERSION }}/docs/man/bashpass{,.conf}.1.gz bashpass-${{ env.RELEASE_VERSION }}/pkgs/deb/usr/share/man/man1/
/usr/bin/dpkg-deb --build bashpass-${{ env.RELEASE_VERSION }}/pkgs/deb/ "bashpass_${{ env.RELEASE_VERSION }}_all.deb"
- uses: actions/upload-artifact@v3
with:
name: deb
path: bashpass_${{ env.RELEASE_VERSION }}_all.deb
1 change: 1 addition & 0 deletions pkgs/deb/DEBIAN/bashpass.dirs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
usr/bin
1 change: 1 addition & 0 deletions pkgs/deb/DEBIAN/bashpass.install
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
bashpass usr/bin
9 changes: 9 additions & 0 deletions pkgs/deb/DEBIAN/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Source: bashpass
Section: utils
Priority: optional
Maintainer: Anton Van Assche <https://github.com/AntonVanAssche>
Package: bashpass
Version: RELEASE_VERSION
Architecture: all
Depends: bash, gnupg2
Description: A command-line based password manager written in Bash.
25 changes: 25 additions & 0 deletions pkgs/deb/DEBIAN/copyright
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: BashPass
Upstream-Contact: Anton Van Assche <https://github.com/AntonVanAssche>
Source: https://github.com/AntonVanAssche/BashPass

License: MIT
Copyright (c) 2022-2024 Anton Van Assche

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
2 changes: 2 additions & 0 deletions pkgs/deb/DEBIAN/manpages
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
DEBIAN/bashpass.1.gz
DEBIAN/bashpass.conf.1.gz

0 comments on commit 32519f2

Please sign in to comment.