diff --git a/.gitea/workflows/build-appimage.yml b/.gitea/workflows/build-appimage.yml index b5f13c7fd0..4a9b21599c 100644 --- a/.gitea/workflows/build-appimage.yml +++ b/.gitea/workflows/build-appimage.yml @@ -99,7 +99,7 @@ jobs: - name: Upload AppImage artifact uses: actions/upload-artifact@v3 with: - name: Eden-AppImage-amd64-${{ steps.version.outputs.version }}-${{ steps.version.outputs.commit }} + name: jdlo-eden-linux path: | Eden-*.AppImage Eden-*.AppImage.zsync @@ -120,54 +120,40 @@ jobs: - name: Upload build info uses: actions/upload-artifact@v3 with: - name: build-info-${{ steps.version.outputs.commit }} + name: build-info path: build-info.txt retention-days: 30 - - name: Generate MD5 hash for release + - name: Prepare release files if: github.event_name == 'release' - id: md5 + id: prepare run: | + # Find and rename files to simpler names APPIMAGE_FILE=$(ls Eden-*.AppImage | head -n 1) ZSYNC_FILE=$(ls Eden-*.AppImage.zsync | head -n 1) - MD5_HASH=$(md5sum "$APPIMAGE_FILE" | awk '{print $1}') - echo "Thanks @arknost for the Linux version" > MD5SUMS.txt - echo "" >> MD5SUMS.txt - echo "\`EdenV2-Linux.AppImage\` MD5: \`$MD5_HASH\`" >> MD5SUMS.txt - cat MD5SUMS.txt - echo "appimage_file=$APPIMAGE_FILE" >> $GITHUB_OUTPUT - echo "zsync_file=$ZSYNC_FILE" >> $GITHUB_OUTPUT + + cp "$APPIMAGE_FILE" jdlo-eden.AppImage + cp "$ZSYNC_FILE" jdlo-eden.AppImage.zsync + + # Generate MD5 hash + MD5_HASH=$(md5sum "jdlo-eden.AppImage" | awk '{print $1}') + + # Create release body with MD5 info + cat > release-body.md <> $GITHUB_OUTPUT - - name: Upload to Release + - name: Upload files to Release if: github.event_name == 'release' - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + uses: akkuman/gitea-release-action@v1 with: - upload_url: ${{ github.event.release.upload_url }} - asset_path: ./${{ steps.md5.outputs.appimage_file }} - asset_name: ${{ steps.md5.outputs.appimage_file }} - asset_content_type: application/x-executable - - - name: Upload zsync to Release - if: github.event_name == 'release' - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ github.event.release.upload_url }} - asset_path: ./${{ steps.md5.outputs.zsync_file }} - asset_name: ${{ steps.md5.outputs.zsync_file }} - asset_content_type: application/octet-stream - - - name: Upload MD5 hash to Release - if: github.event_name == 'release' - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ github.event.release.upload_url }} - asset_path: ./MD5SUMS.txt - asset_name: MD5SUMS.txt - asset_content_type: text/plain + files: |- + jdlo-eden.AppImage + jdlo-eden.AppImage.zsync + body_path: release-body.md + token: ${{ secrets.GITHUB_TOKEN }}