-
Notifications
You must be signed in to change notification settings - Fork 1
41 lines (38 loc) · 1.16 KB
/
python.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
name: Python
# https://raw.githubusercontent.com/messense/crfs-rs/main/.github/workflows/Python.yml
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/streamfy
permissions:
id-token: write
steps:
- uses: actions/checkout@v2
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@9bf09145c3560e451e8d8e87b42ccb3fef5b692d # v36.3.0
with:
since_last_remote_commit: true
files: |
setup.py
- uses: actions/setup-node@v2
with:
node-version: '18'
- run: npm install
working-directory: streamfy/frontend
- run: npm run build
working-directory: streamfy/frontend
- run: sed -i 's/_RELEASE = False/_RELEASE = True/' __init__.py
working-directory: streamfy
- run: cat __init__.py
working-directory: streamfy
- run: python setup.py sdist bdist_wheel
- name: Publish package distributions to PyPI
if: steps.changed-files.outputs.any_changed == 'true'
uses: pypa/gh-action-pypi-publish@release/v1