-
Notifications
You must be signed in to change notification settings - Fork 1
129 lines (106 loc) · 3.36 KB
/
dev_test_publish.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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
name: "DEV Test and Publish"
on:
push:
branches:
- dev
env:
FACTIVA_USERKEY: ${{secrets.FACTIVA_USERKEY}}
FACTIVA_CLIENTID: ${{secrets.FACTIVA_CLIENTID}}
FACTIVA_USERNAME: ${{secrets.FACTIVA_USERNAME}}
FACTIVA_PASSWORD: ${{secrets.FACTIVA_PASSWORD}}
FACTIVA_CLIENT_EMAIL: ${{vars.FACTIVA_CLIENT_EMAIL}}
FACTIVA_SNAPSHOTID: ${{vars.FACTIVA_SNAPSHOTID}}
FACTIVA_SNAPSHOT_UPDATEID: ${{vars.FACTIVA_SNAPSHOT_UPDATEID}}
FACTIVA_STREAMID: ${{secrets.FACTIVA_STREAMID}}
FACTIVA_WHERE: ${{vars.FACTIVA_WHERE}}
FACTIVA_SUBSCRIPTIONID: ${{secrets.FACTIVA_SUBSCRIPTIONID}}
FACTIVA_LOGLEVEL: ${{vars.FACTIVA_LOGLEVEL}}
jobs:
# test:
# name: Test 🧪
# runs-on: ubuntu-latest
# steps:
# - name: Checkout code
# uses: actions/checkout@v4
# with:
# ref: 'dev'
# - name: Set up Python
# uses: actions/setup-python@v5
# with:
# python-version: '3.10.9'
# - name: Install latest PIP
# run: |
# python -m pip install --upgrade pip
# - name: Install Dependencies
# run: |
# python -m pip install pytest pytest-cov
# - name: Setup factiva-analytics <DEV> (this repo)
# run: |
# python -m pip install .
# - name: pytest
# run: pytest test/
build:
name: Build 📦
runs-on: ubuntu-latest
# needs: [test]
permissions:
id-token: write
steps:
- name : Checkout code
uses : actions/checkout@v4
with:
ref: 'dev'
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10.9'
# changes
- name: Install pypa/build
run: |
python -m pip install --upgrade build
- name: Build a binary build and a source tarball
run: |
python -m build
- name: Store the distribution packages
uses: actions/upload-artifact@v4
with:
name: python-package-distributions
path: dist/
# - name: Install latest pip, setuptools, twine + wheel
# run: |
# python -m pip install --upgrade pip setuptools wheel >> $GITHUB_STEP_SUMMARY
# - name: Build wheels
# run: |
# python setup.py bdist_wheel >> $GITHUB_STEP_SUMMARY
# python setup.py sdist >> $GITHUB_STEP_SUMMARY
publish-to-testpypi:
name: Publish 📦 to TestPyPI
needs:
- build
runs-on: ubuntu-latest
environment:
name: testpypi
url: https://test.pypi.org/p/factiva-analytics
permissions:
id-token: write
steps:
- name: Download all the dists
uses: actions/download-artifact@v4
with:
name: python-package-distributions
path: dist/
- name: Publish 📦 to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
verbose: true
skip-existing: true
# - name: GitHub Repo Artifact Upload
# uses: actions/upload-artifact@v4
# with:
# name: Wheel_library
# path: dist/
# - name: Publish package to TestPyPI
# uses: pypa/gh-action-pypi-publish@release/v1
# with:
# repository-url: https://test.pypi.org/legacy/