Skip to content

Build Package

Build Package #4

Workflow file for this run

name: Build Debian Package and Publish Release
on:
workflow_dispatch:
inputs:
release_name:
description: 'Release name'
required: true
default: 'Manual Release'
jobs:
build:
name: Build Package
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install build dependencies
run: sudo apt-get update && sudo apt-get install -y debhelper
- name: Build Debian package
run: dpkg-deb --build vanosilla-linux
- name: Extract version from control file
id: extract_version
run: echo "::set-output name=version::$(awk '/^Version:/ { print $2 }' vanosilla-linux/DEBIAN/control)"
- name: Create release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.TOKEN }}
with:
tag_name: ${{ steps.extract_version.outputs.version }}
release_name: ${{ github.event.inputs.release_name }}
body: Describe the changes in this release.
- name: Upload package asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: vanosilla-linux/*.deb
asset_name: vanosilla-linux.deb
asset_content_type: application/octet-stream