fix: upload DEB packages to GitHub Release

This commit is contained in:
tkmxqrdxddd
2026-03-17 21:08:03 +01:00
parent 1166e34804
commit 73a2b1d724

View File

@@ -80,24 +80,8 @@ jobs:
name: davinci-video-converter-${{ matrix.arch }}.deb name: davinci-video-converter-${{ matrix.arch }}.deb
path: davinci-video-converter_*.deb path: davinci-video-converter_*.deb
- name: Upload to GitHub Release - name: Upload DEB package to GitHub Release
uses: actions/github-script@v7 uses: softprops/action-gh-release@v1
with: with:
script: | files: davinci-video-converter_*.deb
const fs = require('fs'); token: ${{ secrets.GITHUB_TOKEN }}
const tag = context.ref.replace('refs/tags/', '');
const debFile = fs.readdirSync('.').find(f => f.endsWith('${{ matrix.arch }}.deb'));
const release = await github.rest.repos.getReleaseByTag({
owner: context.repo.owner,
repo: context.repo.repo,
tag: tag
});
await github.rest.repos.uploadReleaseAsset({
owner: context.repo.owner,
repo: context.repo.repo,
release_id: release.data.id,
name: debFile,
data: fs.readFileSync(debFile)
});