2023-05-26 14:48:58 +02:00
|
|
|
# SPDX-License-Identifier: MIT
|
|
|
|
|
|
|
|
name: Upload (and download) a release to (and from) the project that runs the workflow
|
2023-03-30 08:52:59 +02:00
|
|
|
on: [push]
|
|
|
|
jobs:
|
2023-05-26 14:48:58 +02:00
|
|
|
upload-download:
|
2023-03-30 08:52:59 +02:00
|
|
|
runs-on: self-hosted
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
2023-03-30 23:30:41 +02:00
|
|
|
- if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
|
|
|
|
id: release-upload
|
2023-03-30 08:52:59 +02:00
|
|
|
uses: SELF@vTest
|
|
|
|
with:
|
|
|
|
direction: upload
|
|
|
|
tag: v1.0
|
2023-03-30 16:28:59 +02:00
|
|
|
token: FORGEJO_TOKEN
|
2023-03-30 08:52:59 +02:00
|
|
|
release-dir: upload-dir
|
|
|
|
release-notes: "RELEASE NOTES"
|
|
|
|
verbose: true
|
2024-02-11 23:40:17 +01:00
|
|
|
- if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
|
2024-07-08 20:49:13 +02:00
|
|
|
id: release-upload-override
|
2024-02-11 23:40:17 +01:00
|
|
|
uses: SELF@vTest
|
|
|
|
with:
|
|
|
|
direction: upload
|
|
|
|
tag: v1.0
|
|
|
|
token: FORGEJO_TOKEN
|
|
|
|
release-dir: upload-dir
|
|
|
|
release-notes: "RELEASE NOTES"
|
2024-07-08 20:49:13 +02:00
|
|
|
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_TOKEN
|
|
|
|
release-dir: upload-dir-v2
|
2024-08-11 09:05:40 +02:00
|
|
|
release-notes: |-
|
|
|
|
No shell expansion should on these notes:
|
|
|
|
- $(some_command)
|
|
|
|
- `other_commend`
|
|
|
|
- "double quoted" and 'single quoted' strings
|
|
|
|
- \backslash escape
|
|
|
|
- !exclamation_mark
|
2024-02-11 23:40:17 +01:00
|
|
|
verbose: true
|
2023-03-30 23:30:41 +02:00
|
|
|
- if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
|
|
|
|
id: release-download
|
2023-03-30 08:52:59 +02:00
|
|
|
uses: SELF@vTest
|
|
|
|
with:
|
|
|
|
direction: download
|
|
|
|
tag: v1.0
|
2023-03-30 16:28:59 +02:00
|
|
|
token: FORGEJO_TOKEN
|
2023-03-30 08:52:59 +02:00
|
|
|
release-dir: download-dir
|
|
|
|
verbose: true
|
2023-03-30 23:30:41 +02:00
|
|
|
- if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
|
|
|
|
run: |
|
2023-03-30 08:52:59 +02:00
|
|
|
diff -u upload-dir download-dir
|
2024-07-08 20:49:13 +02:00
|
|
|
- if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
|
|
|
|
id: release-download-latest
|
|
|
|
uses: SELF@vTest
|
|
|
|
with:
|
|
|
|
direction: download
|
|
|
|
token: FORGEJO_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: failure()
|
|
|
|
run: docker logs forgejo
|