-
Notifications
You must be signed in to change notification settings - Fork 1
48 lines (42 loc) · 1.29 KB
/
release.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
name: Release
on:
push:
branches:
- master
tags:
- v*
paths:
- 'pyproject.toml'
jobs:
release:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
steps:
- name: Set up Git repository
uses: actions/checkout@v3
- name: Set Version
run: echo "VERSION=${GITHUB_REF##*/}" >> $GITHUB_ENV
- name: Install tools
run: pip install build twine
- name: Build
run: |
python -m build
echo "[disutils]" > ~/.pypirc
echo "index-servers=pypi" >> ~/.pypirc
echo "[pypi]" >> ~/.pypirc
echo "username=__token__" >> ~/.pypirc
echo "password=${{ secrets.SECRETS }}" >> ~/.pypirc
cat ~/.pypirc
twine upload dist/* --config-file ~/.pypirc --skip-existing
#- name: Upload
# uses: yaananth/twine-upload@v1
# env:
# RUNNER: ${{ toJson(runner) }}
# SECRETS: ${{ toJson(secrets) }}
- name: Create release
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: true
files: |
./dist/pyAutoMR-v*-py3-none-any.whl