-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add GitHub action to publish pyscitt CLI to PyPi (#169)
- Loading branch information
1 parent
d19ab78
commit fac19ab
Showing
6 changed files
with
128 additions
and
49 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- "*.*.*" | ||
|
||
jobs: | ||
build_pyscitt: | ||
name: "Build pyscitt" | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.8' | ||
|
||
- name: Build pyscitt | ||
run: | | ||
python3 -m pip install build | ||
cd pyscitt | ||
python3 -m build | ||
- name: Upload dist folder | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: dist | ||
path: pyscitt/dist | ||
|
||
create_github_release: | ||
name: "Create GitHub Release" | ||
runs-on: ubuntu-latest | ||
needs: build_pyscitt | ||
|
||
permissions: | ||
contents: write # IMPORTANT: this permission is mandatory for creating a GitHub Release | ||
|
||
steps: | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Download pyscitt dist folder | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: dist | ||
path: pyscitt/dist | ||
|
||
- name: Create GitHub Release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: | | ||
pyscitt/dist/*.whl | ||
pyscitt/dist/*.tar.gz | ||
LICENSE.txt | ||
publish_pyscitt_to_pypi: | ||
name: "Publish pyscitt to PyPI" | ||
runs-on: ubuntu-latest | ||
needs: build_pyscitt | ||
|
||
permissions: | ||
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing to PyPi | ||
|
||
environment: | ||
name: pypi | ||
url: https://pypi.org/p/pyscitt | ||
|
||
steps: | ||
- name: Download pyscitt dist folder | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: dist | ||
path: pyscitt/dist | ||
|
||
- name: Publish pyscitt to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
packages-dir: pyscitt/dist | ||
skip-existing: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,7 @@ | ||
CCF SCITT CLI | ||
---------------- | ||
# pyscitt: Python CLI tools for SCITT CCF Ledger | ||
|
||
The CLI is extensively used in functional tests and in demo scripts: | ||
Tools to sign claims and interact with a SCITT CCF Ledger. | ||
|
||
- [Transparency service demo](../demo/cts_poc/README.md) | ||
- [GitHub hosted DID demo](../demo/github/README.md) | ||
- [CLI tests](../test/test_cli.py) | ||
For more information, please find the `scitt-ccf-ledger` repository at https://github.com/microsoft/scitt-ccf-ledger. | ||
|
||
## Installation | ||
|
||
CLI is written in Python and is distributed through the GitHub releases as a `wheel` file. | ||
|
||
- Download a release: `curl -LO https://github.com/microsoft/scitt-ccf-ledger/releases/download/0.5.0/pyscitt-0.0.1-py3-none-any.whl` | ||
- Install it: `pip install pyscitt-0.0.1-py3-none-any.whl` | ||
- Try it: `scitt --help` | ||
|
||
An alternative way is to clone the repository and just run [`./pyscitt.sh`](../pyscitt.sh), e.g. `./pyscitt.sh --help` | ||
Package sources are available at https://github.com/microsoft/scitt-ccf-ledger/tree/main/pyscitt. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters