Skip to content

Commit d25446f

Browse files
authored
Merge pull request #13 from Delta-Robotics-Inc/dev-heartbeat
Dev heartbeat addition
2 parents 0e9724b + e569033 commit d25446f

27 files changed

+605
-344
lines changed

.github/workflows/pypipublish.yml

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
# This workflow will upload a Python Package to PyPI when a release is created
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries
3+
4+
# This workflow uses actions that are not certified by GitHub.
5+
# They are provided by a third-party and are governed by
6+
# separate terms of service, privacy policy, and support
7+
# documentation.
8+
9+
name: thermoflex
10+
11+
on:
12+
pull_request:
13+
branches:
14+
- main
15+
16+
permissions:
17+
contents: read
18+
19+
jobs:
20+
release-build:
21+
runs-on: ubuntu-latest
22+
23+
steps:
24+
- uses: actions/checkout@v4
25+
26+
- uses: actions/setup-python@v5
27+
with:
28+
python-version: "3.x"
29+
30+
- name: Build release distributions
31+
run: |
32+
cd python-serial/
33+
python -m pip install build
34+
python -m build
35+
36+
- name: Upload distributions
37+
uses: actions/upload-artifact@v4
38+
with:
39+
name: release-dists
40+
path: python-serial/dist/
41+
42+
pypi-publish:
43+
runs-on: ubuntu-latest
44+
needs:
45+
- release-build
46+
permissions:
47+
# IMPORTANT: this permission is mandatory for trusted publishing
48+
id-token: write
49+
50+
# Dedicated environments with protections for publishing are strongly recommended.
51+
# For more information, see: https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment#deployment-protection-rules
52+
environment:
53+
name: pypi
54+
# OPTIONAL: uncomment and update to include your PyPI project URL in the deployment status:
55+
url: https://pypi.org/p/thermoflex/
56+
#
57+
# ALTERNATIVE: if your GitHub Release name is the PyPI project version string
58+
# ALTERNATIVE: exactly, uncomment the following line instead:
59+
# url: https://pypi.org/project/YOURPROJECT/${{ github.event.release.name }}
60+
61+
steps:
62+
- name: Retrieve release distributions
63+
uses: actions/download-artifact@v4
64+
with:
65+
name: release-dists
66+
path: python-serial/dist/
67+
68+
- name: Publish release distributions to PyPI
69+
uses: pypa/gh-action-pypi-publish@release/v1
70+
with:
71+
packages-dir: python-serial/dist/
72+
73+
gh-release-publish:
74+
runs-on: ubuntu-latest
75+
needs:
76+
- release-build
77+
permissions:
78+
# IMPORTANT: this permission is mandatory for trusted publishing
79+
contents: write
80+
id-token: write
81+
82+
steps:
83+
- name: Retrieve release distributions
84+
uses: actions/download-artifact@v4
85+
with:
86+
name: release-dists
87+
path: python-serial/dist/
88+
89+
- name: Sign the dists with Sigstore
90+
uses: sigstore/[email protected]
91+
with:
92+
inputs: >-
93+
./python-serial/dist/*.tar.gz
94+
./python-serial/dist/*.whl
95+
96+
- name: Create GitHub Release
97+
env:
98+
GITHUB_TOKEN: ${{ github.token }}
99+
run: >-
100+
gh release create
101+
"$GITHUB_REF_NAME"
102+
--repo "$GITHUB_REPOSITORY"
103+
--notes ""
104+
105+
- name: Upload artifact signatures to GitHub Release
106+
env:
107+
GITHUB_TOKEN: ${{ github.token }}
108+
# Upload to GitHub Release using the `gh` CLI.
109+
# `dist/` contains the built packages, and the
110+
# sigstore-produced signatures and certificates.
111+
run: >-
112+
gh release upload
113+
"$GITHUB_REF_NAME" dist/**
114+
--repo "$GITHUB_REPOSITORY"
115+
116+
117+

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"files.autoSave": "afterDelay"
3+
}

0 commit comments

Comments
 (0)