-
Notifications
You must be signed in to change notification settings - Fork 3
51 lines (42 loc) · 1.33 KB
/
tagged-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
49
50
51
name: "tagged-release"
on:
push:
tags:
- "v*"
jobs:
tagged-release:
name: "Auto-Release"
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@master
- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Install the module
shell: bash
run: |
python -m pip install --upgrade pip
pip install wheel
pip install -e .[cicd]
- name: Get tag version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
- name: Set PyPi version as tag
run: python -m moepy.cicd set-current-package-version ${{ steps.get_version.outputs.VERSION }}
- name: Create latest distribution
run: |
pip install -e . # reinstalling with new version number
python setup.py sdist bdist_wheel
- name: Publish package to PyPi
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
- name: Update release on GitHub
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
files: |
LICENSE.txt