From 4cb112faf1c260a1b01995a4429fe77f73ad2a2f Mon Sep 17 00:00:00 2001 From: Dan Haman Date: Mon, 28 Sep 2026 14:27:05 +0300 Subject: [PATCH] #3: Create a release in Gitea + release notes support added + docs added --- README.md | 20 +++++++++++++++++++- release/action.yaml | 8 ++++++-- 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index a7132b6..1037265 100644 --- a/README.md +++ b/README.md @@ -24,4 +24,22 @@ Publishes a `generic` package to current Gitea instance. Example: * `file` - path to the file to upload (used as uploaded file name within the package) * `package` - the package name * `version` - the package version, need to be unique (unless force flag is set) -* `force` - false by default; if set **deletes the whole version** of the package (all files) and then publishes instead with the same version \ No newline at end of file +* `force` - false by default; if set **deletes the whole version** of the package (all files) and then publishes instead with the same version + +## Releasae + +Create a tag and a release (if tag is not present) or a release for an existing tag. + +```yaml + - id: create-release + uses: https://source.vague.tech/open-vague/ci-actions/release@feature/3-release + with: + name: Initial release + version: v0.1.0 + - run: | + echo "Id: ${{ steps.create-release.outputs.release_id }}" +``` + +* `name` - release name +* `body` - release notes (or description) +* `version` - tag name \ No newline at end of file diff --git a/release/action.yaml b/release/action.yaml index 032d318..3b76a0f 100644 --- a/release/action.yaml +++ b/release/action.yaml @@ -5,6 +5,10 @@ inputs: name: description: release name required: true + notes: + description: release notes + required: false + default: "" version: description: release version required: true @@ -21,6 +25,6 @@ runs: shell: bash run: | RESPONSE=$(curl -X POST -H "Authorization: token ${ACTI_BOT_TOKEN}" -H "Content-Type: application/json" \ - -d "{\"draft\": false, \"prerelease\": false, \"tag_name\": \"${{ inputs.version }}\", \"name\": \"${{ inputs.name }}\"}" \ + -d "{\"draft\": false, \"prerelease\": false, \"body\": \"${{ inputs.body }}\", \"tag_name\": \"${{ inputs.version }}\", \"name\": \"${{ inputs.name }}\"}" \ ${{ gitea.api_url }}/repos/${{ gitea.repository }}/releases) - echo "id=$(echo "$RESPONSE" | jq -r .id)" >> "$GITEA_OUTPUT" \ No newline at end of file + echo "id=$(echo "$RESPONSE" | jq -r .id)" >> "$GITEA_OUTPUT"