Skip to content

python-semantic-release/upload-to-gh-release

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python Semantic Release - Upload to GitHub Release Action

This GitHub Action runs semantic-release publish using python-semantic-release. Full documentation is available in the documentation for Python Semantic Release.

NOTE: This Action is compatible only with Python Semantic Release v8 or higher.

Example usage

---
name: CI

on:
  push:
    branches:
      - main

jobs:
  release:
    runs-on: ubuntu-latest
    concurrency: release

    # NOTE: this enables trusted publishing.
    # See https://github.com/pypa/gh-action-pypi-publish/tree/release/v1#trusted-publishing
    # and https://blog.pypi.org/posts/2023-04-20-introducing-trusted-publishers/
    permissions:
      id-token: write

    steps:
      - uses: actions/checkout@v3
        with:
          fetch-depth: 0

      - name: Python Semantic Release
        id: release
        uses: python-semantic-release/python-semantic-release@v8.0.x
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          # <other options here>

      - name: Publish package to PyPI
        uses: pypa/gh-action-pypi-publish@release/v1
        if: ${{ steps.release.outputs.released }} == 'true'

      - name: Publish package to GitHub Release
        uses: python-semantic-release/upload-to-gh-release@main
        if: ${{ steps.release.outputs.released }} == 'true'
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          tag: ${{ steps.release.outputs.tag }}

Options

See action.yml for a description of the available options.

About

Upload artefacts to GitHub Releases using Python Semantic Release

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published