mirror of
https://github.com/tkmxqrdxddd/davinci-video-converter
synced 2026-03-29 15:25:33 +02:00
fix: upload DEB packages to GitHub Release
This commit is contained in:
24
.github/workflows/release.yml
vendored
24
.github/workflows/release.yml
vendored
@@ -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)
|
|
||||||
});
|
|
||||||
|
|||||||
Reference in New Issue
Block a user