diff --git a/.gitea/workflows/main.yml b/.gitea/workflows/main.yml index 87b0d62..796827c 100644 --- a/.gitea/workflows/main.yml +++ b/.gitea/workflows/main.yml @@ -29,7 +29,12 @@ jobs: download: https://gitea.ascorrea.com/${{github.repository}}/releases/download/${{github.event.release.tag_name}}/module.zip # Create a zip file with all files required by the module to add to the release - - run: zip -r ./module.zip module.json src/* + - env: + ZIP_FILE_NAME: "module.zip" + DIST_BRANCH_NAME: "main" + run: mkdir -p dist && git archive --format zip --output dist/${ZIP_FILENAME} ${DIST_BRANCH_NAME}:src && cp src/module.json dist/ && echo \"Done!\nArchived to ${ZIP_FILENAME} and copied module.js.\" + + - run: echo $(ls -lah) # Create a release for this specific version - name: Update Release with Files @@ -37,5 +42,5 @@ jobs: uses: akkuman/gitea-release-action@v1 with: files: |- - ./module.json - ./module.zip \ No newline at end of file + ./dist/module.json + ./dist/module.zip \ No newline at end of file