-
-
Notifications
You must be signed in to change notification settings - Fork 24
57 lines (46 loc) · 1.86 KB
/
deploy.yml
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: Upload Python Package
on:
release:
types: [created]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4
with:
fetch-depth: 0
- name: Run semver-diff
id: semver-diff
uses: tj-actions/[email protected]
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.7.x'
- name: Upgrade pip
run: |
pip install -U pip
- name: Install dependencies
run: make install-deploy
- name: Setup git
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
- name: bumpversion
run: |
make increase-version PART="${{ steps.semver-diff.outputs.release_type }}"
- name: Build and publish
run: make release
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
- name: Generate CHANGELOG
uses: tj-actions/[email protected]
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
base: "main"
title: "Upgraded ${{ steps.semver-diff.outputs.old_version }} → ${{ steps.semver-diff.outputs.new_version }}"
branch: "chore/upgrade-${{ steps.semver-diff.outputs.old_version }}-to-${{ steps.semver-diff.outputs.new_version }}"
commit-message: "Upgraded from ${{ steps.semver-diff.outputs.old_version }} → ${{ steps.semver-diff.outputs.new_version }}"
body: "View [CHANGES](https://github.com/${{ github.repository }}/compare/${{ steps.semver-diff.outputs.old_version }}...${{ steps.semver-diff.outputs.new_version }})"
token: ${{ secrets.PAT_TOKEN }}