Skip to content

Commit 5378993

Browse files
committed
Merge branch 'main' into feature/published_docs
2 parents 5de931d + 5d9a9f5 commit 5378993

3 files changed

Lines changed: 70 additions & 3 deletions

File tree

.github/workflows/publish.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,61 @@ jobs:
2020
- name: Install dependencies
2121
run: |
2222
python -m pip install --upgrade pip
23+
python -m pip install --upgrade hatch
24+
25+
- name: Build Release
26+
run: |
27+
hatch -v build -t wheel:standard -t sdist:standard
28+
29+
- name: Set File Names and Release IDs
30+
run: |
31+
src_file=( ./dist/*.tar.gz )
32+
wheel_file=( ./dist/*.whl )
33+
echo "RELEASE_ID=$(jq --raw-output '.release.id' $GITHUB_EVENT_PATH)" >> $GITHUB_ENV
34+
echo "SOURCE_DIST_FILE=$(basename $src_file)" >> $GITHUB_ENV
35+
echo "WHEEL_FILE=$(basename $wheel_file)" >> $GITHUB_ENV
36+
37+
- name: Set Upload Url
38+
run: |
39+
echo "UPLOAD_URL=https://uploads.github.com/repos/${GITHUB_REPOSITORY}/releases/${RELEASE_ID}/assets{?name,label}" >> $GITHUB_ENV
40+
41+
- name: Output Variables For Uploading
42+
id: get_upload_vars
43+
run: |
44+
echo "Release ID: $RELEASE_ID"
45+
echo "Source Dist File: $SOURCE_DIST_FILE"
46+
echo "Source Dist Upload Url: $SOURCE_DIST_URL"
47+
echo "Wheel File: $WHEEL_FILE"
48+
echo "Upload Url: $UPLOAD_URL"
49+
echo "::set-output name=source_dist_path::./dist/${SOURCE_DIST_FILE}"
50+
echo "::set-output name=source_dist_name::${SOURCE_DIST_FILE}"
51+
echo "::set-output name=wheel_path::./dist/${WHEEL_FILE}"
52+
echo "::set-output name=wheel_name::./dist/${WHEEL_FILE}"
53+
echo "::set-output name=upload_url::${UPLOAD_URL}"
54+
55+
- name: Upload Source Distribution to GitHub release
56+
uses: actions/[email protected]
57+
env:
58+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
59+
with:
60+
upload_url: ${{ steps.get_upload_vars.outputs.upload_url }}
61+
asset_path: ${{ steps.get_upload_vars.outputs.source_dist_path }}
62+
asset_name: ${{ steps.get_upload_vars.outputs.source_dist_name }}
63+
asset_content_type: application/x-gzip
64+
65+
- name: Upload Wheel to GitHub Release
66+
uses: actions/[email protected]
67+
env:
68+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
69+
with:
70+
upload_url: ${{ steps.get_upload_vars.outputs.upload_url }}
71+
asset_path: ${{ steps.get_upload_vars.outputs.wheel_path }}
72+
asset_name: ${{ steps.get_upload_vars.outputs.wheel_name }}
73+
asset_content_type: application/zip
74+
75+
- name: Publish Build to PyPI
76+
env:
77+
HATCH_INDEX_USER: '__token__'
78+
HATCH_INDEX_AUTH: ${{ secrets.PYPI_ACCESS_TOKEN }}
79+
run: |
80+
hatch publish dist/*

README.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@
55
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
66
-----
77

8+
The Incydr SDK is a Python client for interacting with the [Code42 Incydr API](https://developer.code42.com/api).
9+
10+
It provides a thin wrapper around the [Requests](https://requests.readthedocs.io/en/latest/) HTTP library with
11+
helper clients that model Code42 data and validate requests with the help of [Pydantic](https://pydantic-docs.helpmanual.io).
12+
13+
**This project is currently in BETA and subject to breaking changes prior to the 1.0 release.**
14+
815
**Table of Contents**
916

1017
- [Installation](#installation)
@@ -16,13 +23,15 @@
1623
pip install incydr
1724
```
1825

19-
## Hatch
26+
# Contributing
27+
28+
## Install hatch
2029

2130
```console
2231
pip install hatch
2332
```
2433

25-
#### Style check
34+
#### Run style checks
2635

2736
```console
2837
hatch run style:check

incydr/__about__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# SPDX-FileCopyrightText: 2022-present Code42 Software <[email protected]>
22
#
33
# SPDX-License-Identifier: MIT
4-
__version__ = "0.0.1"
4+
__version__ = "0.1.0"

0 commit comments

Comments
 (0)