Skip to content

Release note for 1.6.0 (#857) #155

Release note for 1.6.0 (#857)

Release note for 1.6.0 (#857) #155

Workflow file for this run

name: Deployment
on:
push:
branches: [main]
tags: [v*]
workflow_dispatch:
inputs:
reason:
description: Reason for the workflow dispatch. Only "release" is valid.
required: true
default: release
jobs:
deploy:
if: ${{ (github.event_name == 'workflow_dispatch' && github.event.inputs.reason == 'release') || (github.event_name == 'push' && startsWith(github.ref, 'refs/tags')) }}
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install hatch
run: pip install hatch
# this will fail if the last commit is not tagged
- name: Build project for distribution
run: hatch build
- name: Publish on PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
skip_existing: true
verbose: true
sync-branches:
if: ${{ github.event_name == 'workflow_dispatch' }}
needs: deploy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Extract branch name
id: vars
run: |
echo ::set-output name=branch::${GITHUB_REF#refs/*/}
- name: Merge release into main
uses: everlytic/branch-merge@1.1.2
with:
github_token: ${{ secrets.RELEASE_DISPATCH_TOKEN }}
target_branch: main
commit_message_template: ${{ format('[auto][ci skip] Merge branch ''{0}'' into main', steps.vars.outputs.branch) }}