Fizxmike readme patch plus release action #5
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: Release | ||
on: | ||
pull_request: | ||
# push: | ||
# tags: | ||
# - 'v[0-9]+.[0-9]+.[0-9]+' # like v1.0.0 | ||
jobs: | ||
build-dist: | ||
name: Package PyESAPI | ||
runs-on: windows-latest | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
- name: Update pip | ||
run: py -m pip install --upgrade pip | ||
- name: Build package | ||
run: | | ||
py -m pip install --upgrade build | ||
py -m build | ||
test-pypi-publish: | ||
name: Upload release to PyPI | ||
runs-on: ubuntu-latest | ||
needs: build-dist | ||
environment: | ||
name: pypi | ||
url: https://test.pypi.org/p/PyESAPI | ||
permissions: | ||
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing | ||
steps: | ||
- name: Publish package distributions to TestPyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
repository-url: https://test.pypi.org/legacy/ | ||
github-release: | ||
name: Create release in GitHub | ||
runs-on: windows-latest | ||
needs: [build-dist, pypi-publish] | ||
steps: | ||
- name: Create Release | ||
uses: softprops/[email protected] | ||
with: | ||
name: PyESAPI ${{ github.ref_name }} | ||
tag_name: ${{ github.ref_name }} | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
draft: true | ||
files: dist/* | ||
prerelease: false | ||
body: | | ||
This is the official `${{ github.ref_name }}` release of the PyESAPI for use on Eclipse TBOX or VIC environment for Eclipse versions 15.1 and up. |