forgejo-release/testdata/upload-download/.forgejo/workflows/test.yml
Crown0815 47387821e5
Some checks are pending
/ integration (push) Waiting to run
fix: support slashes in tags (#62)
Resolves actions/forgejo-release#22

Co-authored-by: Felix Kröner <felix.kroener@bruker.com>
Reviewed-on: https://code.forgejo.org/actions/forgejo-release/pulls/62
Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org>
Co-authored-by: Crown0815 <crown0815@noreply.code.forgejo.org>
Co-committed-by: Crown0815 <crown0815@noreply.code.forgejo.org>
2025-07-25 06:50:17 +00:00

108 lines
3.4 KiB
YAML

# SPDX-License-Identifier: MIT
name: Upload (and download) a release to (and from) the project that runs the workflow
on: [push]
jobs:
upload-download:
runs-on: self-hosted
steps:
- uses: actions/checkout@v4
- if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
id: release-upload
uses: SELF@vTest
with:
direction: upload
tag: v1.0
token: FORGEJO_TEST_TOKEN
release-dir: upload-dir
release-notes: "RELEASE NOTES"
verbose: true
- if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
id: release-upload-override
uses: SELF@vTest
with:
direction: upload
tag: v1.0
token: FORGEJO_TEST_TOKEN
release-dir: upload-dir
release-notes-assistant: true
hide-archive-link: true
override: true
verbose: true
- if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
id: release-upload-v2
uses: SELF@vTest
with:
direction: upload
tag: v2.0
token: FORGEJO_TEST_TOKEN
release-dir: upload-dir-v2
release-notes: |-
No shell expansion should on these notes:
- $(some_command)
- `other_commend`
- "double quoted" and 'single quoted' strings
- \backslash escape
- !exclamation_mark
verbose: true
- if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
id: release-upload-slash-in-tag
uses: SELF@vTest
with:
direction: upload
tag: a/v3.0
token: FORGEJO_TOKEN
release-dir: upload-dir
release-notes: "RELEASE NOTES"
verbose: true
- if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
id: release-upload-override-slash-in-tag
uses: SELF@vTest
with:
direction: upload
tag: a/v3.0
token: FORGEJO_TOKEN
release-dir: upload-dir
release-notes-assistant: true
hide-archive-link: true
override: true
verbose: true
- if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
id: release-download
uses: SELF@vTest
with:
direction: download
tag: v1.0
token: FORGEJO_TEST_TOKEN
release-dir: download-dir
verbose: true
- if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
run: |
diff -u upload-dir download-dir
- if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
id: release-download-latest
uses: SELF@vTest
with:
direction: download
token: FORGEJO_TEST_TOKEN
release-dir: download-dir-v2
download-latest: true
verbose: true
- if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
run: |
diff -u upload-dir-v2 download-dir-v2
- if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
id: release-download-with-slash-in-tag
uses: SELF@vTest
with:
direction: download
tag: a/v3.0
token: FORGEJO_TEST_TOKEN
release-dir: download-dir-v3a
download-latest: true
verbose: true
- if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
run: |
diff -u upload-dir download-dir-v3a
- if: failure()
run: docker logs forgejo