Fix workflow

This commit is contained in:
Andrew Cassidy 2024-08-27 23:59:35 -07:00
parent 834ac8f3fc
commit aaf95da610

View File

@ -8,9 +8,6 @@ jobs:
build:
name: Build Distribution
runs-on: ubuntu-22.04
outputs:
body-file: ${{ steps.yaclog-show.outputs.body-file }}
version-name: ${{ steps.yaclog-show.outputs.name }}
steps:
- uses: actions/checkout@v4
@ -19,10 +16,6 @@ jobs:
with:
python-version: '3.12'
- name: Get Changelog Information
id: yaclog-show
uses: drewcassidy/yaclog@main
- name: Install pypa/build
run: python -m pip install build --user
@ -35,8 +28,8 @@ jobs:
path: dist/
compression-level: 0 # already compressed
publish-pypi:
name: Deploy to PyPI
publish:
name: Deploy to PyPI and Github
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
needs: build
runs-on: ubuntu-22.04
@ -45,36 +38,27 @@ jobs:
url: https://pypi.org/project/yaclog-ksp/${{ github.ref_name }}
permissions:
id-token: write
contents: write
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: python-distribution
path: dist/
- name: Get Changelog Information
id: yaclog-show
uses: drewcassidy/yaclog@1.4.3
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
publish-github:
name: Deploy to Github
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
needs: build
runs-on: ubuntu-22.04
environment:
name: Publish
url: https://github.com/${{ github.repository }}/releases/tag/${{ github.ref_name }}
permissions:
contents: write
steps:
- uses: actions/download-artifact@v4
with:
name: python-distribution
path: dist/
- name: Publish to Github
run: >
gh release create ${{ github.ref_name }}
--notes-file "${{ needs.build.outputs.body-file }}"
--title "${{ needs.build.outputs.version-name }}"
--notes-file "${{ steps.yaclog-show.outputs.body-file }}"
--title "${{ steps.yaclog-show.outputs.name }}"
dist/*
env:
GH_TOKEN: ${{ github.token }}