Skip to content

Commit

Permalink
ci: build deb
Browse files Browse the repository at this point in the history
  • Loading branch information
jaxvanyang committed Nov 19, 2024
1 parent 9805b31 commit fe1e6e1
Showing 1 changed file with 29 additions and 2 deletions.
31 changes: 29 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ name: Release

on:
release:
types:
- published
types: [published]

jobs:
pypi-publish:
Expand All @@ -12,6 +11,7 @@ jobs:
environment: release
permissions:
id-token: write
if: github.event.release.prerelease == false
steps:
- uses: actions/checkout@v4
- name: Set up Python
Expand All @@ -28,3 +28,30 @@ jobs:
run: python -m build
- name: Publish
uses: pypa/gh-action-pypi-publish@release/v1
deb-package:
name: Build deb package
runs-on: ubuntu-24.04
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get update
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y \
--no-install-recommends build-essential devscripts debhelper equivs
sudo mk-build-deps -ir
- name: Create upstream tarball
run: |
version=$(git describe --tags | sed 's/^v//;s/-.*$//;s/_.*$//')
git archive --format=tar.gz --prefix="dotbackup-$version/" HEAD > \
"../dotbackup_$version.orig.tar.gz"
- name: Build
run: debuild -us -uc -b && mv ../*.deb .
- uses: actions/upload-artifact@v4
with:
name: deb
path: '*.deb'
- uses: softprops/action-gh-release@v2
with:
files: '*.deb'

0 comments on commit fe1e6e1

Please sign in to comment.