forked from jfrog/project-examples
-
Notifications
You must be signed in to change notification settings - Fork 0
82 lines (74 loc) · 2.4 KB
/
twine.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
name: "Twine build"
on: push
#env:
# JFROG_CLI_BUILD_NAME: "custom build name"
# JFROG_CLI_BUILD_NUMBER: "123"
permissions:
# This is required for requesting the OIDC token
id-token: write
# This is required for actions/checkout
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup JFrog CLI
uses: jfrog/setup-jfrog-cli@v4
id: setup-cli
#uses: jfrog/setup-jfrog-cli@master
#uses: RobiNino/setup-jfrog-cli@reorder-summary
env:
#JFROG_CLI_BUILD_NAME: "custom build name"
#JFROG_CLI_BUILD_NUMBER: "123"
JF_URL: ${{ vars.JF_URL_ECO }}
JF_USER: ${{ secrets.JF_USER }}
JF_PASSWORD: ${{ secrets.JF_PASSWORD }}
#JF_PROJECT: "robip"
#JF_ACCESS_TOKEN: ${{ secrets.JF_ACCESS_TOKEN }}
#with:
#download-repository: generic-local-robi
#disable-job-summary: true
#version: 2.59.1
# # OIDC provider name from the OIDC integration page in the JFrog Platform
# #oidc-provider-name: robi-oidc-test-groups
- name: Setup Python3
uses: actions/setup-python@v5
with:
python-version: "3.11.5"
- name: Setup Python Build
run: python -m pip install --upgrade pip setuptools wheel build twine
#- name: Package managers versions
# run: |
# #jf rt dl generic-local-robi/cli-for-summary/jfrog-cli-linux-amd64/jfrog --flat --fail-no-op
# #chmod +x ./jfrog
#
# jf -v
# which jf
# docker --version
# mvn -v
# python --version
# pip --version
# wheel version
# pip show setuptools
# echo $VIRTUAL_ENV
# node -v
# npm -v
# go version
- name: Pip build
env:
TWINE_REPOSITORY_URL: "https://ecosysjfrog.jfrog.io/artifactory/api/pypi/twine-local"
TWINE_USERNAME: ${{ secrets.JF_USER }}
TWINE_PASSWORD: ${{ secrets.JF_PASSWORD }}
run: |
#cd python-example/twine-example/
cd python-example/pip-example/
jf pip-config --repo-resolve=robi-pypi-virtual
jf pip install . --module=jfrog-python-example
python -m build
twine upload "dist/*"
- name: Publish build info
run: |
jf rt bce
jf rt bp