Skip to content

Commit

Permalink
Release 0.4.0
Browse files Browse the repository at this point in the history
Signed-off-by: Marcus G K Williams <Marcus G K Williams 168222+mgkwill@users.noreply.github.com>
  • Loading branch information
Marcus G K Williams authored and Marcus G K Williams committed Jul 25, 2023
1 parent ec3740f commit 614155c
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 20 deletions.
29 changes: 24 additions & 5 deletions .github/workflows/cd.yml
Expand Up @@ -47,7 +47,7 @@ jobs:
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: 3.10
python-version: "3.10"

- name: Test artifact tar.gz
run: |
Expand Down Expand Up @@ -87,7 +87,7 @@ jobs:
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: 3.10
python-version: "3.10"

- name: Test artifact tar.gz
run: |
Expand Down Expand Up @@ -135,6 +135,7 @@ jobs:
if: github.triggering_actor == 'mgkwill' || github.triggering_actor == 'PhilippPlank' || github.triggering_actor == 'tim-shea'
permissions:
contents: write
id-token: write
needs: [build-artifacts, test-artifact-install, test-artifact-use]

steps:
Expand Down Expand Up @@ -180,12 +181,30 @@ jobs:
generateReleaseNotes: true
makeLatest: true

- name: Mint Github API token
id: mint-token
run: |
# retrieve the ambient OIDC token
resp=$(curl -H "Authorization: bearer $ACTIONS_ID_TOKEN_REQUEST_TOKEN" \
"$ACTIONS_ID_TOKEN_REQUEST_URL&audience=pypi")
oidc_token=$(jq '.value' <<< "${resp}")
# exchange the OIDC token for an API token
resp=$(curl -X POST https://pypi.org/_/oidc/github/mint-token -d "{\"token\": \"${oidc_token}\"}")
api_token=$(jq '.token' <<< "${resp}")
# mask the newly minted API token, so that we don't accidentally leak it
echo "::add-mask::${api_token}"
# see the next step in the workflow for an example of using this step output
echo "api-token=${api_token}" >> "${GITHUB_OUTPUT}"
- name: Publish to PyPI
if: steps.check-version.outputs.prerelease != 'true'
env:
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}
POETRY_HTTP_BASIC_PYPI_USERNAME: __token__
POETRY_HTTP_BASIC_PYPI_PASSWORD: ${{ steps.mint-token.outputs.api-token }}
run: |
mkdir dist
cp lava* dist/.
# poetry config repositories.testpypi https://test.pypi.org/legacy/
poetry publish --dry-run
poetry publish
22 changes: 9 additions & 13 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions pyproject.toml
Expand Up @@ -10,7 +10,7 @@ packages = [
{include = "tests"}
]
include = ["tutorials"]
version = "0.4.0.dev0"
version = "0.4.0"
description = "A library of deep learning tools, which consists of lava.lib.dl.slayer and lava.lib.dl.netx for training and deployment of event-based deep neural networks on traditional as well as neuromorphic backends. Lava-DL is part of Lava Framework"
homepage = "https://lava-nc.org/"
repository = "https://github.com/lava-nc/lava-dl"
Expand Down Expand Up @@ -47,7 +47,7 @@ classifiers = [
[tool.poetry.dependencies]
python = ">=3.8, <3.11"

lava-nc = { git = "https://github.com/lava-nc/lava.git", branch = "main", develop = true }
lava-nc = "0.8.0"

torchvision = "^0.14.0"
h5py = "^3.7.0"
Expand Down

0 comments on commit 614155c

Please sign in to comment.