This commit is contained in:
@@ -113,26 +113,26 @@ jobs:
|
|||||||
cd build
|
cd build
|
||||||
zip -r "../${SLUG}-${{ steps.meta.outputs.version }}.zip" "${SLUG}"
|
zip -r "../${SLUG}-${{ steps.meta.outputs.version }}.zip" "${SLUG}"
|
||||||
|
|
||||||
- name: Debug - check RELEASE_TOKEN is set
|
- name: Install tea CLI
|
||||||
|
run: |
|
||||||
|
TEA_VERSION="0.14.2"
|
||||||
|
curl -fL -o /usr/local/bin/tea \
|
||||||
|
"https://gitea.com/gitea/tea/releases/download/v${TEA_VERSION}/tea-${TEA_VERSION}-linux-amd64"
|
||||||
|
chmod +x /usr/local/bin/tea
|
||||||
|
tea --version
|
||||||
|
|
||||||
|
- name: Create Gitea Release (tea CLI)
|
||||||
if: steps.check.outputs.should_release == 'true'
|
if: steps.check.outputs.should_release == 'true'
|
||||||
run: |
|
run: |
|
||||||
if [ -z "${{ secrets.RELEASE_TOKEN }}" ]; then
|
ZIP="${{ steps.meta.outputs.slug }}-${{ steps.meta.outputs.version }}.zip"
|
||||||
echo "::error::RELEASE_TOKEN secret is empty or not set."
|
|
||||||
exit 1
|
|
||||||
else
|
|
||||||
echo "RELEASE_TOKEN is set (length: ${#TOKEN})."
|
|
||||||
fi
|
|
||||||
env:
|
|
||||||
TOKEN: ${{ secrets.RELEASE_TOKEN }}
|
|
||||||
|
|
||||||
- name: Create Gitea Release
|
tea login add \
|
||||||
if: steps.check.outputs.should_release == 'true'
|
--name ci \
|
||||||
uses: https://github.com/akkuman/gitea-release-action@v1
|
--url "${{ gitea.server_url }}" \
|
||||||
env:
|
--token "${{ secrets.RELEASE_TOKEN }}"
|
||||||
NODE_OPTIONS: "--experimental-fetch" # only needed if runner's node < 18
|
|
||||||
with:
|
tea releases create \
|
||||||
files: |-
|
--repo "${{ gitea.repository }}" \
|
||||||
${{ steps.meta.outputs.slug }}-${{ steps.meta.outputs.version }}.zip
|
--tag "${{ steps.check.outputs.tag }}" \
|
||||||
tag_name: "${{ steps.check.outputs.tag }}"
|
--title "${{ steps.meta.outputs.name }} ${{ steps.meta.outputs.version }}" \
|
||||||
name: "${{ steps.meta.outputs.name }} ${{ steps.meta.outputs.version }}"
|
--asset "${ZIP}"
|
||||||
token: "${{ secrets.RELEASE_TOKEN }}"
|
|
||||||
Reference in New Issue
Block a user