Skip to content

Commit 9e8aaa7

Browse files
committed
chore: consolidate
1 parent 85f3049 commit 9e8aaa7

3 files changed

Lines changed: 101 additions & 93 deletions

File tree

.github/workflows/build.yml

Lines changed: 0 additions & 81 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 100 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,30 +10,119 @@ permissions:
1010
id-token: write
1111

1212
jobs:
13-
test-pypi-release:
14-
uses: ./.github/workflows/build.yml
15-
secrets:
16-
registry-token: ${{ secrets.TEST_PYPI_TOKEN }}
17-
with:
18-
registry-name: "testpypi"
19-
registry-url: "https://test.pypi.org/legacy/"
20-
package-url: "https://test.pypi.org/project/science-synapse/"
13+
sdist:
14+
name: Build source distribution
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
with:
20+
submodules: "recursive"
21+
- uses: actions/setup-python@v5
22+
- name: Prep repo
23+
run: |
24+
pip install -r requirements.txt
25+
make
26+
- name: Build sdist
27+
run: python -m build --sdist
28+
- uses: actions/upload-artifact@v4
29+
with:
30+
name: sdist
31+
path: dist/*.tar.gz
32+
33+
publish-testpypi:
34+
name: Publish to testpypi
35+
needs: [sdist]
36+
runs-on: ubuntu-latest
37+
environment:
38+
name: testpypi
39+
url: https://test.pypi.org/legacy/
40+
permissions:
41+
id-token: write
42+
steps:
43+
- uses: actions/download-artifact@v4
44+
with:
45+
name: sdist
46+
path: dist
47+
48+
- name: List files
49+
run: ls -la dist/
50+
51+
- name: Publish package distributions to testpypi
52+
uses: pypa/gh-action-pypi-publish@release/v1
53+
with:
54+
repository-url: https://test.pypi.org/legacy/
55+
verbose: true
2156

2257
validate-test-pypi-release:
2358
runs-on: ubuntu-latest
24-
needs: test-pypi-release
59+
needs: publish-testpypi
2560
steps:
2661
- name: install test pypi release
2762
run: |
28-
pip install --index-url https://test.pypi.org/simple/ science-synapse==v1.0.1-rc.2
63+
# Get version from GitHub ref (removes 'refs/tags/v' prefix)
64+
VERSION=${GITHUB_REF_NAME#v}
65+
pip install --index-url https://test.pypi.org/simple/ science-synapse==$VERSION
2966
30-
- name: run examples
67+
- name: validate
3168
run: |
69+
# Run Help
70+
synapsectl --help
71+
72+
# Run Simulator
3273
synapse-sim --iface-ip 127.0.0.1 --rpc-port 50051 &
3374
sleep 2
75+
76+
# Run Example
3477
python synapse/examples/stream_out.py 127.0.0.1:50051
78+
79+
# Kill Simulator
3580
kill $(jobs -p)
3681
82+
# publish-pypi:
83+
# name: Publish to pypi
84+
# needs: [validate-test-pypi-release]
85+
# runs-on: ubuntu-latest
86+
# environment:
87+
# name: pypi
88+
# url: https://pypi.org/p/science-synapse/
89+
# permissions:
90+
# id-token: write
91+
# steps:
92+
# - uses: actions/download-artifact@v4
93+
# with:
94+
# name: sdist
95+
# path: dist
96+
97+
# - name: Publish package distributions to pypi
98+
# uses: pypa/gh-action-pypi-publish@release/v1
99+
# with:
100+
# verbose: true
101+
102+
# test-pypi-release:
103+
# uses: ./.github/workflows/build.yml
104+
# secrets:
105+
# registry-token: ${{ secrets.TEST_PYPI_TOKEN }}
106+
# with:
107+
# registry-name: "testpypi"
108+
# registry-url: "https://test.pypi.org/legacy/"
109+
# package-url: "https://test.pypi.org/project/science-synapse/"
110+
111+
# validate-test-pypi-release:
112+
# runs-on: ubuntu-latest
113+
# needs: test-pypi-release
114+
# steps:
115+
# - name: install test pypi release
116+
# run: |
117+
# pip install --index-url https://test.pypi.org/simple/ science-synapse==v1.0.1-rc.2
118+
119+
# - name: run examples
120+
# run: |
121+
# synapse-sim --iface-ip 127.0.0.1 --rpc-port 50051 &
122+
# sleep 2
123+
# python synapse/examples/stream_out.py 127.0.0.1:50051
124+
# kill $(jobs -p)
125+
37126
# pypi-release:
38127
# uses: ./.github/workflows/build.yml
39128
# with:

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
setup(
2828
name="science-synapse",
29-
version="1.0.1-rc.2",
29+
version="1.0.1",
3030
description="Client library and CLI for the Synapse API",
3131
author="Science Team",
3232
author_email="team@science.xyz",

0 commit comments

Comments
 (0)