From db7460ca33b57497552fdabb78fe3dd6d0f53705 Mon Sep 17 00:00:00 2001 From: Dan Haman Date: Mon, 28 Sep 2026 19:46:44 +0300 Subject: [PATCH] #8 : Publish fails if path provided + extra slashes in filename issue fixed --- .gitignore | 1 + attach/action.yaml | 1 + publish/action.yaml | 5 ++++- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index df94313..d00a17d 100644 --- a/.gitignore +++ b/.gitignore @@ -201,3 +201,4 @@ cython_debug/ # PyPI configuration file .pypirc +*.code-workspace \ No newline at end of file diff --git a/attach/action.yaml b/attach/action.yaml index 0b84781..34b578f 100644 --- a/attach/action.yaml +++ b/attach/action.yaml @@ -20,5 +20,6 @@ runs: $NAME: ${{ inputs.name }} run: | name="${NAME:-${{ inputs.file }}}" + name="${name##*/}" curl --fail-with-body -X POST -H "Authorization: token ${ACTI_BOT_TOKEN}" -F "attachment=@${{ inputs.file }}" \ ${{ gitea.api_url }}/repos/${{ gitea.repository }}/releases/${{ inputs.release }}/assets?name=${name} \ No newline at end of file diff --git a/publish/action.yaml b/publish/action.yaml index 5fd5685..a6609c9 100644 --- a/publish/action.yaml +++ b/publish/action.yaml @@ -20,8 +20,11 @@ runs: using: composite steps: - shell: bash + env: + INPUT_FILE: ${{ inputs.file }} run: | set -euo pipefail + filename="${INPUT_FILE##*/}" if [[ "${{ inputs.force }}" == "true" ]]; then status="$( curl --silent --show-error --output /dev/null --write-out '%{http_code}' \ @@ -41,4 +44,4 @@ runs: curl --fail-with-body \ --user "acti-bot:${ACTI_BOT_TOKEN}" \ --upload-file ${{ inputs.file }} \ - "${{ gitea.server_url }}/api/packages/${{ gitea.repository_owner }}/generic/${{ inputs.package }}/${{ inputs.version }}/${{ inputs.file }}" + "${{ gitea.server_url }}/api/packages/${{ gitea.repository_owner }}/generic/${{ inputs.package }}/${{ inputs.version }}/${filename}" -- 2.52.0