-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (50 loc) · 1.46 KB
/
python-package.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
58
59
name: Start a New Release
on:
workflow_dispatch:
inputs:
version:
description: 'Version Tag in the form X.Y.Z'
required: true
type: string
jobs:
build:
if: github.actor != 'github-actions[bot]'
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/[email protected]
with:
fetch-tags: true
ref: master
token: ${{ secrets.APP_SECRET }} # Needed to trigger other actions
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.9"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install hatch git-cliff
- name: Update changelog
run: |
git cliff -o CHANGELOG.md
# - name: Create Release
# id: create_release
# uses: actions/create-release@v1
# env:
# GITHUB_TOKEN: ${{ secrets.APP_SECRET }}
# with:
# tag_name: ${{ inputs.version }}
# release_name: Release ${{ inputs.version }}
# draft: false
# prerelease: false
- name: Build package
run: hatch build
- name: Publish to PyPI
run: |
export PYPI_USERNAME=__token__
export PYPI_PASSWORD=${{ secrets.TEST_PASS_PYPI }}
hatch publish
env:
PYPI_USERNAME: __token__
PYPI_PASSWORD: ${{ secrets.TEST_PASS_PYPI }}