forgejo-release/testdata/upload-download/.forgejo/workflows/test.yml
Earl Warren d051ae27b2
fix(ci): s/FORGEJO_TOKEN/FORGEJO_TEST_TOKEN/ (#64)
Reviewed-on: https://code.forgejo.org/actions/forgejo-release/pulls/64
Co-authored-by: Earl Warren <contact@earl-warren.org>
Co-committed-by: Earl Warren <contact@earl-warren.org>
2025-07-26 05:22:53 +00:00

96 lines
3 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: lxc-bookworm
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-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-upload-slash-in-tag
uses: SELF@vTest
with:
direction: upload
tag: v/3.0
token: FORGEJO_TEST_TOKEN
release-dir: upload-dir-v3
release-notes: "RELEASE NOTES"
verbose: true
- if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
id: release-download-with-slash-in-tag
uses: SELF@vTest
with:
direction: download
tag: v/3.0
token: FORGEJO_TEST_TOKEN
release-dir: download-dir-v3
verbose: true
- if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
run: |
diff -u upload-dir-v3 download-dir-v3
- if: failure()
run: docker logs forgejo