Skip to content

Commit

Permalink
Update CI script to automatize releases on Github
Browse files Browse the repository at this point in the history
  • Loading branch information
buddly27 committed May 13, 2024
1 parent 64d31da commit 38ae011
Showing 1 changed file with 26 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ on:
tags:
- "*"

permissions:
contents: read

jobs:
pypi-publish:
if: startsWith(github.ref, 'refs/tags/')

runs-on: ubuntu-latest

environment: release

permissions:
id-token: write

Expand All @@ -38,3 +38,26 @@ jobs:
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

github-release:
runs-on: ubuntu-latest
name: GitHub release
environment: release
permissions:
contents: write

steps:
- uses: actions/checkout@v4

- name: Get release version
id: get_version
uses: actions/github-script@v7
with:
script: core.setOutput('version', context.ref.replace("refs/tags/", ""))

- name: Create GitHub release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
name: "v${{ steps.get_version.outputs.version }}"
body: "Notes: https://python-cmake.github.io/pytest-cmake/release/release_notes.html"

0 comments on commit 38ae011

Please sign in to comment.