gha: softprops (#7) #15
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
name: CI | |
on: | |
pull_request: | |
branches: | |
- main | |
push: | |
tags: | |
- 'v*.*.*' # Matches tags like v1.0.0 | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.9" | |
- name: Install dependencies (pyproject.toml) | |
run: | | |
python -m pip install --upgrade pip | |
pip install build | |
python pypltagent-eth.py -h | |
- name: Run flake8 linter | |
run: | | |
pip install flake8 | |
flake8 . | |
release: | |
runs-on: ubuntu-latest | |
if: startsWith(github.ref, 'refs/tags/') | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.9" | |
- name: Build .deb package | |
run: make | |
- name: Release | |
uses: softprops/action-gh-release@v2 | |
with: | |
files: pypltagent.noarch.deb | |
tag_name: ${{ github.ref_name }} | |
name: ${{ github.ref_name }} | |
body: "Release for version ${{ github.ref_name }}" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |