Skip to content

Refactor and #3

Refactor and #3 #1

Workflow file for this run

name: Build and publish
on:
push:
branches: [ "master" ]
pull_request:
jobs:
build:
name: Build rmtree
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Build
run: python -m build
- uses: actions/upload-artifact@v4
with:
name: rmtree
path: dist/rmtree-*-py3-none-any.whl
if-no-files-found: error
retention-days: 3
test-build:
name: Test wheel file with pipx
runs-on: ubuntu-latest
needs: [ build ]
steps:
- name: Install pipx
run: |
sudo apt update
sudo apt install pipx
pipx ensurepath
- uses: actions/download-artifact@v4
with:
name: rmtree
- name: Test rmtree.whl
run: |
pipx install ./rmtree-*-py3-none-any.whl
rmtree -h
# publish: # TODO use https://github.com/TriPSs/conventional-changelog-action & https://github.com/marketplace/actions/release-please-action ?
# name: Publish new release
# runs-on: ubuntu-latest
# needs: [test, build]
# permissions:
# contents: write
# if: ${{ github.ref_name == 'master' || github.ref_name == 'dev' }}
# steps:
# - uses: actions/checkout@v4
# - uses: actions/download-artifact@v4
# with:
# name: rmtree
# - name: Publish release
# uses: softprops/action-gh-release@v2
# with:
# name: Release 0.0.2
# files: rmtree-*-py3-none-any.whl
# draft: ${{ github.ref_name != 'master' && github.ref_name != 'dev' }}
# prerelease: ${{ github.ref_name != 'master' }}
# target_commitish: ${{ github.head_ref || github.ref_name }}
# tag_name: 0.0.2
# generate_release_notes: true