From 2aa55841d659183a6d78e2288b16d224dfe90218 Mon Sep 17 00:00:00 2001 From: idanb Date: Wed, 15 Jan 2025 14:05:40 +0200 Subject: [PATCH 1/2] update release workflow to build from existing tag --- .github/workflows/publish_release.yml | 30 ++++++--------------------- 1 file changed, 6 insertions(+), 24 deletions(-) diff --git a/.github/workflows/publish_release.yml b/.github/workflows/publish_release.yml index 03ef6ea..f7b4de4 100644 --- a/.github/workflows/publish_release.yml +++ b/.github/workflows/publish_release.yml @@ -5,13 +5,12 @@ on: version: type: string required: true - description: "Version to build (1.2.3)" + description: "Release version (e.g. 1.2.3). Corresponding tag (v1.2.3) should already exist." to_testpypi: type: boolean required: true default: true - description: "use testpypi and not push tag" - + description: "Publish to testpypi." jobs: @@ -19,10 +18,12 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + with: + ref: v${{ inputs.version }} - name: Install Python 3 uses: actions/setup-python@v5 with: - python-version: "3.10" + python-version: "3.11" - name: Validate version shell: bash @@ -34,26 +35,11 @@ jobs: exit(1) END - - name: Validate tags - shell: bash - run: | - new_tag=v${{ inputs.version }} - echo new_tag: $new_tag - - git pull --tags - # if tag exists, returns 0 (and ret doesn't get defined) - git rev-parse $new_tag >& /dev/null|| ret=$? - if [[ -z $ret ]]; then - echo "Error: Git tag $new_tag already exists!" - exit 1 - fi - echo "new_tag=${new_tag}" >> $GITHUB_ENV - - name: update version shell: bash run: | echo "__version__ = '${{ inputs.version }}'" > sony_custom_layers/version.py - echo "print sony_custom_layers/version.py" + echo "sony_custom_layers/version.py content:" cat sony_custom_layers/version.py - name: Build wheel @@ -67,13 +53,9 @@ jobs: shell: bash run: | twine upload --repository pypi dist/* -u __token__ -p ${{ secrets.PYPI_API_KEY }} - git tag ${{ env.new_tag }} - git push origin ${{ env.new_tag }} - name: Publish package testpypi if: inputs.to_testpypi == true shell: bash run: | twine upload --repository testpypi dist/* -u __token__ -p ${{ secrets.TEST_PYPI_API_KEY }} - - From d300370209789cfbd6b962f460149f82dc50a4dc Mon Sep 17 00:00:00 2001 From: "GitHub Actions [Bot]" Date: Wed, 15 Jan 2025 12:19:11 +0000 Subject: [PATCH 2/2] Update docs [Created by Github action] --- docs/index.html | 6 +-- docs/sony_custom_layers/keras.html | 32 ++++++------ docs/sony_custom_layers/pytorch.html | 78 ++++++++++++++-------------- 3 files changed, 58 insertions(+), 58 deletions(-) diff --git a/docs/index.html b/docs/index.html index 175d5cf..dda7db9 100644 --- a/docs/index.html +++ b/docs/index.html @@ -3,14 +3,14 @@ - - Module List – pdoc 14.7.0 + + Module List – pdoc 15.0.1 - + diff --git a/docs/sony_custom_layers/keras.html b/docs/sony_custom_layers/keras.html index 4170c5f..6adad5a 100644 --- a/docs/sony_custom_layers/keras.html +++ b/docs/sony_custom_layers/keras.html @@ -3,14 +3,14 @@ - + sony_custom_layers.keras API documentation - +