-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
90376cc
commit 9901fd7
Showing
1 changed file
with
20 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |