From aa2551a736e70b7a8667e818d4cdb0c5dda7ddd4 Mon Sep 17 00:00:00 2001 From: Resilex Hitanachi Date: Wed, 8 Jan 2025 12:38:38 -0500 Subject: [PATCH] Make the file name repo aware --- .gitea/workflows/zip.yaml | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/.gitea/workflows/zip.yaml b/.gitea/workflows/zip.yaml index 9aed975..2b216c8 100644 --- a/.gitea/workflows/zip.yaml +++ b/.gitea/workflows/zip.yaml @@ -1,6 +1,13 @@ name: Create Archive run-name: ${{ gitea.actor }} is making a zip archive -on: [workflow_dispatch ] +on: + workflow_dispatch: + inputs: + version: + description: 'Package Version' + required: true + default: '0.0.0' + type: string jobs: zip: @@ -14,12 +21,12 @@ jobs: - name: Checkout LFS objects run: git lfs checkout - - name: Get current date - id: date - run: echo "::set-output name=date::$(date +'%Y-%m-%d')" + - name: Get current repo + id: repo + run: echo "::set-output name=repo::$(result=$(echo $GITHUB_REPOSITORY | cut -d'/')" - name: Zip repository - run: zip -r Beefycuga-${{ steps.date.outputs.date }}.zip . -x "*.git*" + run: zip -r {{ steps.repo.outputs.repo }}-${{ steps.date.outputs.date }}.zip . -x "*.git*" - name: Release artifacts to Gitea repository uses: akkuman/gitea-release-action@v1 @@ -27,6 +34,6 @@ jobs: NODE_OPTIONS: '--experimental-fetch' # if nodejs < 18 with: files: |- - Beefycuga-${{ steps.date.outputs.date }}.zip - tag_name: ${{ steps.date.outputs.date }} - name: Release - ${{ steps.date.outputs.date }} \ No newline at end of file + {{ steps.repo.outputs.repo }}-${{ inputs.version }}.zip + tag_name: ${{ inputs.version }} + name: Release - ${{ inputs.version }} \ No newline at end of file