Skip to content

semantic release

semantic release #5

name: Semantic Release
on:
push:
branches:
- master
pull_request:
branches:
- master
workflow_dispatch:
jobs:
release:
name: Semantic Release
runs-on: ubuntu-latest
concurrency: release
permissions:
contents: write
issues: write
pull-requests: write
id-token: write
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
fetch-tags: true
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install python-semantic-release build
- name: Install project dependencies
run: |
pip install -e .
# or if you use poetry:
# pip install poetry && poetry install
- name: Semantic Release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config user.name github-actions
git config user.email github-actions@github.com
semantic-release publish
- name: Python Semantic Release
uses: python-semantic-release/python-semantic-release
with:
github_token: ${{ secrets.GITHUB_TOKEN }}