10
0
Fork 0
mirror of https://code.forgejo.org/actions/forgejo-release synced 2026-04-17 08:59:57 +00:00

feat: release notes from file (#141)

Reviewed-on: https://code.forgejo.org/actions/forgejo-release/pulls/141
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
Co-authored-by: nihklas <nihklas@noreply.code.forgejo.org>
Co-committed-by: nihklas <nihklas@noreply.code.forgejo.org>
This commit is contained in:
nihklas 2026-02-10 15:23:36 +00:00 committed by Michael Kriese
parent 94a60cb661
commit 8fb94f88a4
No known key found for this signature in database
GPG key ID: F128CBE6AB3A7201
9 changed files with 125 additions and 0 deletions

View file

@ -48,6 +48,37 @@ jobs:
test $(cat /tmp/v1.json | jq -r .hide_archive_links) = true
- name: testdata/release-notes-file
run: |
export LOOP_DELAY=30
export FORGEJO_RUNNER_LOGS="${{ steps.forgejo.outputs.runner-logs }}"
forgejo-test-helper.sh run_workflow testdata/release-notes-file http://testuser:admin1234@${{ steps.forgejo.outputs.host-port }} testuser release-notes-file forgejo-release "${{ steps.forgejo.outputs.token }}"
set -ex
export FORGEJO="${{ steps.forgejo.outputs.url }}"
curl --fail -sS $FORGEJO/api/v1/repos/testuser/release-notes-file/releases/tags/v1.0 > /tmp/v1.json
curl --fail -sS $FORGEJO/api/v1/repos/testuser/release-notes-file/releases/tags/v2.0 > /tmp/v2.json
curl --fail -sS $FORGEJO/api/v1/repos/testuser/release-notes-file/releases/tags/v3.0 > /tmp/v3.json
EXPECTED='# This is a Release Note
Some *formatted*,
multiline
Markdown content.
```bash
echo "Even a code block"
```'
test "$EXPECTED" = "$(jq -r .body < /tmp/v1.json)"
test "$EXPECTED" = "$(jq -r .body < /tmp/v2.json)"
test "I wont be there" != "$(jq -r .body < /tmp/v2.json)"
test "$EXPECTED" != "$(jq -r .body < /tmp/v3.json)"
test "I will be there" = "$(jq -r .body < /tmp/v3.json)"
- name: testdata/upload-download-private
run: |
export LOOP_DELAY=30