Skip to content

Commit

Permalink
Update build-deb.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
WallcroftUK authored Feb 9, 2024
1 parent 90376cc commit 9901fd7
Showing 1 changed file with 20 additions and 36 deletions.
56 changes: 20 additions & 36 deletions .github/workflows/build-deb.yml
Original file line number Diff line number Diff line change
@@ -1,47 +1,31 @@
name: Build Debian Package and Upload Release
name: Create the DEB

permissions:
contents: write

on:
workflow_dispatch:
push:
branches:
- main

jobs:
build:
Create_Packages:
name: Create Package
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y build-essential dh-make devscripts

- name: Build Debian package
run: dpkg-buildpackage -us -uc -b
- name: Checkout code
uses: actions/checkout@v3
with:
path: "REPO"

- name: Find Deb Package
id: find_deb
- name: Copy necessary files to build the package
run: |
deb_file=$(find . -maxdepth 1 -type f -name '*.deb' | head -n 1)
echo "::set-output name=deb_file::$deb_file"
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v1.0.0 # Specify the tag name for the release
release_name: Release v1.0.0 # Specify the release name
body: |
Describe the changes in this release.
mkdir -p PKG_SOURCE/DEBIAN
cp -Rf REPO/debian/* PKG_SOURCE/DEBIAN
cp -Rf REPO/src/* PKG_SOURCE/
dpkg-deb --build PKG_SOURCE vanosilla.deb
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Release the Package
uses: softprops/action-gh-release@v1
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ steps.find_deb.outputs.deb_file }}
asset_name: my-deb-package.deb
asset_content_type: application/octet-stream
files: vanosilla.deb

0 comments on commit 9901fd7

Please sign in to comment.