-
Notifications
You must be signed in to change notification settings - Fork 526
105 lines (86 loc) · 2.41 KB
/
deploys.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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
name: Deploys
on:
workflow_dispatch:
workflow_run:
workflows: ["Release Generator"]
types:
- completed
permissions:
packages: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event }}
cancel-in-progress: true
jobs:
tagext:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
env:
OS: ${{ matrix.os }}
PYTHON: '3.8'
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Getting Tag
id: tag_extractor
run: echo "latest_tag=$(git describe --tags --abbrev=0)" >> "$GITHUB_OUTPUT"
- name: Getting Tag 2
id: tag_extractor_2
run: |
TAG=${{ steps.tag_extractor.outputs.latest_tag }}
echo "latest_tag_2=${TAG:1} " >> "$GITHUB_OUTPUT"
outputs:
tag: ${{ steps.tag_extractor.outputs.latest_tag }}
pypi:
needs: tagext
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
environment: Deploys
strategy:
matrix:
python-version: [3.8]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Build and Publish Python Packages
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
python setup.py sdist
twine upload dist/*
pypi_2:
needs: tagext
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
environment: Deploys
strategy:
matrix:
python-version: [3.8]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Build and Publish Python Packages
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
python gca_setup_generator.py
python gca_setup.py sdist
twine upload dist/*