Skip to content

Commit 336b8b7

Browse files
authored
Merge pull request #223 from Ondkloss/feature/auto-release
Added automatic release workflow, for use with GitHub Actions
2 parents 4e7d6f7 + 4406ba7 commit 336b8b7

1 file changed

Lines changed: 40 additions & 0 deletions

File tree

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: automatic-release
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
release_type:
7+
description: Release type
8+
required: true
9+
type: choice
10+
options:
11+
- patch
12+
- minor
13+
- major
14+
15+
jobs:
16+
release:
17+
name: Release
18+
runs-on: ubuntu-22.04
19+
steps:
20+
- name: Checkout repository
21+
uses: actions/checkout@v4
22+
with:
23+
fetch-depth: 0
24+
- name: Setup Git
25+
run: |
26+
git config --local user.email "action@github.com"
27+
git config --local user.name "GitHub Action"
28+
- name: Setup Python
29+
uses: actions/setup-python@v4
30+
with:
31+
python-version: '3.8'
32+
- name: Install prerequisites
33+
run: pip install -r release-requirements.txt
34+
- name: Execute release
35+
env:
36+
SEMVER_BUMP: ${{ github.event.inputs.release_type }}
37+
TWINE_REPOSITORY: ${{ vars.TWINE_REPOSITORY }}
38+
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
39+
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
40+
run: ./release $SEMVER_BUMP

0 commit comments

Comments
 (0)