-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (52 loc) · 1.63 KB
/
main.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
60
61
62
63
64
65
66
name: Version and Deploy
on:
workflow_dispatch:
inputs:
version:
description: 'Version'
required: true
jobs:
build:
runs-on: ubuntu-latest
env:
VERSION: ${{ github.event.inputs.version }}
NAME: ${{ github.event.repository.name }}
ORG: ${{ github.repository_owner }}
NAME_SHORT: tools
#SHLINK_API_KEY: ${{ secrets.SHLINK_API_KEY }}
#LINK_ID: tools
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install Tools
run: |
pip install twine
- name: Increment Version
env:
GIT_EMAIL: ${{ secrets.GIT_EMAIL }}
run: |
git config --global user.name 'Frontmatter Actions'
git config --global user.email "$GIT_EMAIL"
echo -n ${VERSION} > ${ORG}/${NAME_SHORT}/version
git add ${ORG}/${NAME_SHORT}/version
git commit -am "Increment version number to ${VERSION} for release"
git push
git tag -a v${VERSION} -m "Release version ${VERSION}"
git checkout --track origin/release
git rebase main
git push --follow-tags
- name: Release
uses: softprops/action-gh-release@v1
with:
tag_name: v${{ github.event.inputs.version }}
generate_release_notes: true
- name: Build Wheel
run: |
python setup.py sdist bdist_wheel
- name: Push Wheel
env:
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
TWINE_USERNAME: __token__
run: |
twine upload dist/*