Workflow file for this run
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
# This is a basic workflow to publish debian packages for new releases | |
name: Build and publish .deb for latest release | |
# Controls when the action will run. | |
on: | |
# Triggers the workflow on push events but only for new tags | |
push: | |
tags: | |
- "*.*.*" | |
workflow_dispatch: | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
# This workflow contains a single job called "build-and-release" | |
build-and-release: | |
# The type of runner that the job will run on | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
language: [ 'python' ] | |
permissions: | |
contents: write | |
packages: write | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- name: Checkout repository | |
uses: actions/checkout@master | |
with: | |
fetch-depth: 0 | |
# Runs a single command using the runners shell | |
- name: install-deps | |
run: | | |
sudo apt-get update -qq | |
sudo apt install -y build-essential debhelper devscripts dh-python \ | |
gettext libglib2.0-bin python python3-all python3-setuptools python3-sphinx | |
- name: build-deb | |
run: | | |
dpkg-buildpackage -b -nc -tc | |
ls ../*.deb | |
ls ../*.changes | |
- name: get latest tag | |
id: gettag | |
run: echo "latesttag=$(git describe --tags --abbrev=0 || git rev-list --max-parents=0 ${{github.ref}})" >> $GITHUB_OUTPUT | |
- name: Create Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
tag_name: ${{ steps.gettag.outputs.latesttag }} | |
generate_release_notes: true | |
draft: false | |
prerelease: false | |
files: | | |
../*.deb | |
../*.changes | |
env: | |
GITHUB_TOKEN: ${{ github.token }} |