Skip to content

Release workflow might need write-all to create Github release? #29

Release workflow might need write-all to create Github release?

Release workflow might need write-all to create Github release? #29

Workflow file for this run

name: Release and publish
on:
push:
tags:
- 'v*'
jobs:
release:
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/sumo
permissions: write-all
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: 3.14
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install build
pip install .[tests]
- name: Test
run: pytest
- name: Build packages
run: |
python -m build
- name: Publish
uses: pypa/gh-action-pypi-publish@release/v1
- name: Write release info
run: |
awk 'BEGIN {p = 0} {a = 0 }; /^v\d*.\d*.\d*./ { p += 1; a = 1}; p + a == 1 { print } ' CHANGELOG.rst | sed -e '1,1d' | sed -e '/./,$!d' -e :a -e '/^\n*$/{$d;N;ba' -e '}' > release_info.txt
- name: Release
uses: actions/create-release@v1
id: create_release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
body_path: release_info.txt
draft: false
prerelease: false