Skip to content

Commit 25976a5

Browse files
committed
ci: Add release workflow
1 parent 5041ec4 commit 25976a5

File tree

1 file changed

+56
-0
lines changed

1 file changed

+56
-0
lines changed

.github/workflows/release.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Copyright 2025 ETH Zurich and University of Bologna.
2+
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
3+
# SPDX-License-Identifier: Apache-2.0
4+
#
5+
# Author: Tim Fischer <fischeti@iis.ee.ethz.ch>
6+
7+
name: "Publish"
8+
9+
on:
10+
push:
11+
tags:
12+
- v*
13+
workflow_dispatch:
14+
15+
jobs:
16+
publish-pypi:
17+
name: Publish to PyPI
18+
if: github.event_name == 'push'
19+
runs-on: ubuntu-latest
20+
permissions:
21+
id-token: write
22+
contents: read
23+
steps:
24+
- name: Checkout
25+
uses: actions/checkout@v5
26+
- name: Install uv
27+
uses: astral-sh/setup-uv@v7
28+
- name: Build
29+
run: uv build
30+
- name: Smoke tests
31+
run: |
32+
uv run --isolated --no-project --with dist/*.whl floogen rtl -c floogen/examples/axi_mesh_xy.yml
33+
uv run --isolated --no-project --with dist/*.tar.gz floogen rtl -c floogen/examples/axi_mesh_xy.yml
34+
- name: Publish
35+
run: uv publish
36+
37+
publish-test-pypi:
38+
name: Publish to Test PyPI
39+
if: github.event_name == 'workflow_dispatch'
40+
runs-on: ubuntu-latest
41+
permissions:
42+
id-token: write
43+
contents: read
44+
steps:
45+
- name: Checkout
46+
uses: actions/checkout@v5
47+
- name: Install uv
48+
uses: astral-sh/setup-uv@v7
49+
- name: Build
50+
run: uv build
51+
- name: Smoke tests
52+
run: |
53+
uv run --isolated --no-project --with dist/*.whl floogen rtl -c floogen/examples/axi_mesh_xy.yml
54+
uv run --isolated --no-project --with dist/*.tar.gz floogen rtl -c floogen/examples/axi_mesh_xy.yml
55+
- name: Publish
56+
run: uv publish --index testpypi

0 commit comments

Comments
 (0)