forked from pyg-team/pytorch_geometric
-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (34 loc) · 1.27 KB
/
nightly.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
name: Nightly Build
on: # yamllint disable-line rule:truthy
workflow_dispatch:
schedule:
- cron: "0 6 * * *" # Everyday at 6:00am UTC/10:00pm PST
jobs:
build:
if: github.repository == 'pyg-team/pytorch_geometric'
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/[email protected]
with:
python-version: 3.8
- name: Set version
run: echo "VERSION=$(sed -n "s/^__version__ = '\(.*\)'/\1/p" torch_geometric/__init__.py)" >> ${GITHUB_ENV}
- name: Set time
run: echo "TODAY=$(date +'%Y%m%d')" >> ${GITHUB_ENV}
- name: Customize build version
run: |
sed -i "s/$VERSION/$VERSION.dev$TODAY/" torch_geometric/__init__.py
sed -i '0,/name="torch_geometric"/s//name="pyg-nightly"/' pyproject.toml # Only change first occurence
sed -i "s/version=\"$VERSION\"/version=\"$VERSION.dev$TODAY\"/" pyproject.toml
- name: Build package
run: |
pip install --upgrade build
python -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}