From 3953f6309b9256adfc7731523e6efaa543e75643 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Tue, 21 Nov 2023 17:03:38 +0100 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=93=9D=20logViewModel=20->=20logsView?= =?UTF-8?q?Model?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes #4906 --- docs/plugins/viewmodels.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/plugins/viewmodels.rst b/docs/plugins/viewmodels.rst index b787a081a..6be30b8ce 100644 --- a/docs/plugins/viewmodels.rst +++ b/docs/plugins/viewmodels.rst @@ -122,7 +122,7 @@ gcodeViewModel View model for the gcode viewer tab. gcodeFilesViewModel Deprecated in favor of ``filesViewModel``. -logViewModel +logsViewModel View model for the logfile settings dialog. loginStateViewModel View model for the current login state of the user, very interesting for plugins that need to From fcc99bd2cedc08ac256abe41003816910c6797ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Tue, 21 Nov 2023 17:50:23 +0100 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=91=B7=20Publish=20release=20artifact?= =?UTF-8?q?s=20as=20release=20assets?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Closes #4908 --- .github/workflows/build.yml | 37 ++++++++++++++++++++++++++++++++----- 1 file changed, 32 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 66bbab9fa..3ffd8fb99 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -195,8 +195,8 @@ jobs: name: octoprint-logs path: ${{ github.workspace }}/e2econfig/logs - publish-on-testpypi: - name: 📦 Publish on TestPyPI + publish-on-release: + name: 📦 Publish on GitHub release if: github.event_name == 'release' && github.repository == 'OctoPrint/OctoPrint' needs: - pre-commit @@ -211,12 +211,39 @@ jobs: with: name: dist path: dist - - name: 📦 Publish to index + + - name: ⬆ Upload to release + run: | + UPLOAD_URL="https://uploads.github.com/repos/${{ github.repository }}/releases/${{ github.event.release.id }}/assets" + for file in dist/*; do + [ -e "$file" ] || exit 1 + echo "Uploading $file..." + response=$(curl -s -XPOST \ + -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ + -H "Content-Type: $(file -b --mime-type $file)" \ + --data-binary @$file \ + "$UPLOAD_URL?name=$(basename $file)") + echo "$response" | jq -e '.errors' >/dev/null && echo "Error uploading $file to release: $response" && exit 1 || true + done + + publish-on-testpypi: + name: 📦 Publish on TestPyPI + if: github.event_name == 'release' && github.repository == 'OctoPrint/OctoPrint' + needs: + - publish-on-release + runs-on: ubuntu-latest + steps: + - name: ⬇ Download build result + uses: actions/download-artifact@v3 + with: + name: dist + path: dist + - name: ⬆ Upload to index uses: pypa/gh-action-pypi-publish@release/v1 continue-on-error: true with: password: ${{ secrets.testpypi_password }} - repository_url: https://test.pypi.org/legacy/ + repository-url: https://test.pypi.org/legacy/ publish-on-pypi: name: 📦 Publish tagged releases to PyPI @@ -229,7 +256,7 @@ jobs: with: name: dist path: dist - - name: 📦 Publish to index + - name: ⬆ Publish to index uses: pypa/gh-action-pypi-publish@release/v1 with: password: ${{ secrets.pypi_password }}