#8 : Publish fails if path provided #9

Merged
devastator merged 1 commits from bug/8-filenames into master 2026-09-28 19:46:57 +03:00
3 changed files with 6 additions and 1 deletions
+1
View File
@@ -201,3 +201,4 @@ cython_debug/
# PyPI configuration file # PyPI configuration file
.pypirc .pypirc
*.code-workspace
+1
View File
@@ -20,5 +20,6 @@ runs:
$NAME: ${{ inputs.name }} $NAME: ${{ inputs.name }}
run: | run: |
name="${NAME:-${{ inputs.file }}}" name="${NAME:-${{ inputs.file }}}"
name="${name##*/}"
curl --fail-with-body -X POST -H "Authorization: token ${ACTI_BOT_TOKEN}" -F "attachment=@${{ inputs.file }}" \ 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} ${{ gitea.api_url }}/repos/${{ gitea.repository }}/releases/${{ inputs.release }}/assets?name=${name}
+4 -1
View File
@@ -20,8 +20,11 @@ runs:
using: composite using: composite
steps: steps:
- shell: bash - shell: bash
env:
INPUT_FILE: ${{ inputs.file }}
run: | run: |
set -euo pipefail set -euo pipefail
filename="${INPUT_FILE##*/}"
if [[ "${{ inputs.force }}" == "true" ]]; then if [[ "${{ inputs.force }}" == "true" ]]; then
status="$( status="$(
curl --silent --show-error --output /dev/null --write-out '%{http_code}' \ curl --silent --show-error --output /dev/null --write-out '%{http_code}' \
@@ -41,4 +44,4 @@ runs:
curl --fail-with-body \ curl --fail-with-body \
--user "acti-bot:${ACTI_BOT_TOKEN}" \ --user "acti-bot:${ACTI_BOT_TOKEN}" \
--upload-file ${{ inputs.file }} \ --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}"