-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (33 loc) · 1009 Bytes
/
release.yml
File metadata and controls
34 lines (33 loc) · 1009 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
name: Release
on:
workflow_dispatch:
inputs:
part:
description: 'Version part to increment'
required: true
default: 'minor'
type: choice
options:
- major
- minor
- patch
jobs:
# 1. Run bumpversion (commits and tags)
# 2. Build and publish with flit
# 3. Push commits and tags
release:
runs-on: ubuntu-latest
steps:
- run: git config --global user.name "github-actions[bot]"
# Bot email address: https://github.com/orgs/community/discussions/26560
- run: git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- run: pip install bump2version flit
- run: bump2version ${{ github.event.inputs.part }}
- run: git push
- run: git push --tags
- run: flit publish
env:
FLIT_USERNAME: __token__
FLIT_PASSWORD: ${{ secrets.PYPI_KEY }}