Skip to content

Build and Publish GH+PyPi #39

Build and Publish GH+PyPi

Build and Publish GH+PyPi #39

Workflow file for this run

name: Build and Publish
on:
workflow_dispatch:
permissions:
contents: write
discussions: write
jobs:
build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build sdist
run: pipx run build --sdist
- uses: actions/upload-artifact@v3
with:
path: dist/*.tar.gz
Release:
needs: [build_sdist]
runs-on: ubuntu-latest
environment: pypi
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v3
with:
name: artifact
path: dist
- uses: pypa/gh-action-pypi-publish@release/v1
- name: Create list of .whl files
run: |
find . -name "*.tar.gz" > filelist.txt
echo "FILE_LIST=$(cat filelist.txt)" >> $GITHUB_ENV
echo "${{ env.FILE_LIST }}"
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
body: |
Please read the CHANGELOG for further information:
https://github.com/LUCIT-Systems-and-Development/lucit-licensing-python/blob/main/CHANGELOG.md
discussion_category_name: releases
draft: false
files: |
lucit-licensing-python-1.0.17.tar.gz
generate_release_notes: true
name: lucit_licensing_python
prerelease: false
tag_name: 1.0.17
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}