From 6185893c8da6f234a44a0e5e7528d983f577fd6b Mon Sep 17 00:00:00 2001 From: Dan Haman Date: Mon, 28 Sep 2026 16:54:55 +0300 Subject: [PATCH] #4 : Implement Attach artifact to a release action + basic skeleton added --- attach/action.yaml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 attach/action.yaml diff --git a/attach/action.yaml b/attach/action.yaml new file mode 100644 index 0000000..76e9542 --- /dev/null +++ b/attach/action.yaml @@ -0,0 +1,24 @@ +name: attach artefact to release +description: attach file to an existing release in gitea + +inputs: + release: + description: release id + required: true + file: + description: file name to attach + required: true + name: + description: artefact name override + required: false + +runs: + using: composite + steps: + - shell: bash + env: + $NAME: ${{ inputs.name }} + run: | + name="${$NAME:-${{ 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} \ No newline at end of file