mirror of
https://github.com/drewcassidy/yaclog-ksp.git
synced 2024-09-01 14:58:44 +00:00
Fix workflow
This commit is contained in:
parent
834ac8f3fc
commit
aaf95da610
38
.github/workflows/build.yml
vendored
38
.github/workflows/build.yml
vendored
@ -8,9 +8,6 @@ jobs:
|
|||||||
build:
|
build:
|
||||||
name: Build Distribution
|
name: Build Distribution
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
outputs:
|
|
||||||
body-file: ${{ steps.yaclog-show.outputs.body-file }}
|
|
||||||
version-name: ${{ steps.yaclog-show.outputs.name }}
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
@ -19,10 +16,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
python-version: '3.12'
|
python-version: '3.12'
|
||||||
|
|
||||||
- name: Get Changelog Information
|
|
||||||
id: yaclog-show
|
|
||||||
uses: drewcassidy/yaclog@main
|
|
||||||
|
|
||||||
- name: Install pypa/build
|
- name: Install pypa/build
|
||||||
run: python -m pip install build --user
|
run: python -m pip install build --user
|
||||||
|
|
||||||
@ -35,8 +28,8 @@ jobs:
|
|||||||
path: dist/
|
path: dist/
|
||||||
compression-level: 0 # already compressed
|
compression-level: 0 # already compressed
|
||||||
|
|
||||||
publish-pypi:
|
publish:
|
||||||
name: Deploy to PyPI
|
name: Deploy to PyPI and Github
|
||||||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
|
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
|
||||||
needs: build
|
needs: build
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
@ -45,36 +38,27 @@ jobs:
|
|||||||
url: https://pypi.org/project/yaclog-ksp/${{ github.ref_name }}
|
url: https://pypi.org/project/yaclog-ksp/${{ github.ref_name }}
|
||||||
permissions:
|
permissions:
|
||||||
id-token: write
|
id-token: write
|
||||||
|
contents: write
|
||||||
steps:
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- uses: actions/download-artifact@v4
|
- uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: python-distribution
|
name: python-distribution
|
||||||
path: dist/
|
path: dist/
|
||||||
|
|
||||||
|
- name: Get Changelog Information
|
||||||
|
id: yaclog-show
|
||||||
|
uses: drewcassidy/yaclog@1.4.3
|
||||||
|
|
||||||
- name: Publish to PyPI
|
- name: Publish to PyPI
|
||||||
uses: pypa/gh-action-pypi-publish@release/v1
|
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
|
- name: Publish to Github
|
||||||
run: >
|
run: >
|
||||||
gh release create ${{ github.ref_name }}
|
gh release create ${{ github.ref_name }}
|
||||||
--notes-file "${{ needs.build.outputs.body-file }}"
|
--notes-file "${{ steps.yaclog-show.outputs.body-file }}"
|
||||||
--title "${{ needs.build.outputs.version-name }}"
|
--title "${{ steps.yaclog-show.outputs.name }}"
|
||||||
dist/*
|
dist/*
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ github.token }}
|
GH_TOKEN: ${{ github.token }}
|
Loading…
Reference in New Issue
Block a user