This commit is contained in:
@@ -113,26 +113,26 @@ jobs:
|
||||
cd build
|
||||
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'
|
||||
run: |
|
||||
if [ -z "${{ secrets.RELEASE_TOKEN }}" ]; then
|
||||
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 }}
|
||||
ZIP="${{ steps.meta.outputs.slug }}-${{ steps.meta.outputs.version }}.zip"
|
||||
|
||||
- name: Create Gitea Release
|
||||
if: steps.check.outputs.should_release == 'true'
|
||||
uses: https://github.com/akkuman/gitea-release-action@v1
|
||||
env:
|
||||
NODE_OPTIONS: "--experimental-fetch" # only needed if runner's node < 18
|
||||
with:
|
||||
files: |-
|
||||
${{ steps.meta.outputs.slug }}-${{ steps.meta.outputs.version }}.zip
|
||||
tag_name: "${{ steps.check.outputs.tag }}"
|
||||
name: "${{ steps.meta.outputs.name }} ${{ steps.meta.outputs.version }}"
|
||||
token: "${{ secrets.RELEASE_TOKEN }}"
|
||||
tea login add \
|
||||
--name ci \
|
||||
--url "${{ gitea.server_url }}" \
|
||||
--token "${{ secrets.RELEASE_TOKEN }}"
|
||||
|
||||
tea releases create \
|
||||
--repo "${{ gitea.repository }}" \
|
||||
--tag "${{ steps.check.outputs.tag }}" \
|
||||
--title "${{ steps.meta.outputs.name }} ${{ steps.meta.outputs.version }}" \
|
||||
--asset "${ZIP}"
|
||||
Reference in New Issue
Block a user