-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (56 loc) · 1.83 KB
/
main.yaml
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
---
name: Main branch workflow
on:
push:
branches:
- main
jobs:
release:
runs-on: [ubuntu-latest]
outputs:
project_version: ${{ steps.get_project_version.outputs.project_version }}
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.11
uses: actions/setup-python@v1
with:
python-version: '3.11'
- name: Get a project version
id: get_project_version
run: echo "::set-output name=project_version::$(make get-project-version)"
- name: Install project requirements
run: make install-requirements
- name: Make a release
env:
ACCESS_TOKEN: ${{secrets.GIT_HUB_ACCESS_TOKEN}}
run: |
project-version release \
--provider=GitHub \
--organization=dmytrostriletskyi \
--repository=intentions \
--branch=main \
--project-version=${{ steps.get_project_version.outputs.project_version }}
deploy:
runs-on: [ubuntu-latest]
needs: [release]
outputs:
project_version: ${{ steps.get_project_version.outputs.project_version }}
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.11
uses: actions/setup-python@v1
with:
python-version: '3.11'
- name: Get a project version
id: get_project_version
run: echo "::set-output name=project_version::$(make get-project-version)"
- name: Install project requirements
run: make install-requirements
- name: Build the package
run: python3 setup.py sdist
- name: Deploy the package
run: |
twine upload \
--username __token__ \
--password ${{ secrets.PYPI_PASSWORD }} \
dist/intentions-${{ steps.get_project_version.outputs.project_version }}.tar.gz