forked from graphframes/graphframes
-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (43 loc) · 1.16 KB
/
python-publish.yml
File metadata and controls
50 lines (43 loc) · 1.16 KB
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
name: python-pypi-publish
on:
push:
branches:
- main
tags:
- "*.*.*"
jobs:
release:
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/graphframes-py
permissions:
id-token: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up JDK
if: startsWith(github.ref, 'refs/tags/')
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'zulu'
- name: Set up Python
if: startsWith(github.ref, 'refs/tags/')
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Set up Poetry
if: startsWith(github.ref, 'refs/tags/')
uses: snok/install-poetry@v1
- name: Build GraphFrames python
if: startsWith(github.ref, 'refs/tags/')
working-directory: python
run: |
poetry version ${{ github.ref_name }}
poetry build
- name: PyPi publish
if: startsWith(github.ref, 'refs/tags/')
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: python/dist