Skip to content

Commit

Permalink
Release 0.3.0
Browse files Browse the repository at this point in the history
Signed-off-by: Marcus G K Williams <Marcus G K Williams [email protected]>
  • Loading branch information
Marcus G K Williams authored and Marcus G K Williams committed Jul 25, 2023
1 parent c3aefd1 commit 22b1fba
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
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
artifact=$(ls | grep lava_optimization | grep tar)
pip install --no-input $artifact
python -c 'import lava.lib.optimization.solvers'
python -c 'import lava.lib.optimization.solvers.qp.solver'
python -c 'import lava.lib.optimization.solvers.generic'
pip uninstall -y lava-optimization
deactivate
rm -rf artifact-test
Expand All @@ -68,7 +68,7 @@ jobs:
artifact=$(ls | grep lava_optimization | grep whl)
pip install --no-input $artifact
python -c 'import lava.lib.optimization.solvers'
python -c 'import lava.lib.optimization.solvers.qp.solver'
python -c 'import lava.lib.optimization.solvers.generic'
pip uninstall -y lava-optimization
deactivate
rm -rf artifact-test
Expand Down Expand Up @@ -136,6 +136,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 @@ -181,12 +182,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
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ packages = [
{include = "tests"}
]
include = ["tutorials"]
version = "0.3.0.dev0"
version = "0.3.0"
description = "A library of solvers that leverage neuromorphic hardware for constrained optimization. Lava-Optimization is part of Lava Framework. Lava-optimization is part of Lava Framework"
homepage = "https://lava-nc.org/"
repository = "https://github.com/lava-nc/lava-optimization"
Expand Down Expand Up @@ -48,7 +48,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"

numpy = "^1.24.4"
networkx = "<=2.8"
Expand Down

0 comments on commit 22b1fba

Please sign in to comment.