Skip to content

Commit 417ccc9

Browse files
committed
ci: linux bin artifact gen
1 parent 95fb154 commit 417ccc9

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

.github/workflows/tauri-build-dev.yml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212
outputs:
1313
release_id: ${{ steps.create-release.outputs.result }}
14+
upload_url: ${{ steps.create-release.outputs.upload_url }}
1415

1516
steps:
1617
- uses: actions/checkout@v4
@@ -27,6 +28,11 @@ jobs:
2728
uses: actions/github-script@v7
2829
with:
2930
script: |
31+
function setOutput(key, value) {
32+
// Temporary hack until core actions library catches up with github new recommendations
33+
const output = process.env['GITHUB_OUTPUT']
34+
fs.appendFileSync(output, `${key}=${value}${os.EOL}`)
35+
}
3036
const { data } = await github.rest.repos.createRelease({
3137
owner: context.repo.owner,
3238
repo: context.repo.repo,
@@ -37,6 +43,7 @@ jobs:
3743
draft: true,
3844
prerelease: true
3945
})
46+
setOutput('upload_url', data.upload_url);
4047
return data.id
4148
4249
build-mac-m1-node-modules:
@@ -304,8 +311,20 @@ jobs:
304311
tar -cvzf binDist.tar.gz -C ./src-tauri/target/release binDist
305312
ls -alh binDist.tar.gz
306313
GLIBC_VER=$(ldd --version | head -n1 | awk '{print $NF}')
307-
mv binDist.tar.gz "binDist-needGLIBC-${GLIBC_VER}.tar.gz"
314+
OUTPUT_FILENAME="binDist-needGLIBC-${GLIBC_VER}.tar.gz"
315+
mv binDist.tar.gz "$OUTPUT_FILENAME"
316+
echo "OUTPUT_FILENAME=$OUTPUT_FILENAME" >> $GITHUB_ENV
308317
ls
318+
- name: Upload Release Asset
319+
id: upload-release-asset
320+
uses: actions/upload-release-asset@v1
321+
env:
322+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
323+
with:
324+
upload_url: ${{ needs.create-release.outputs.upload_url }}
325+
asset_path: ${{ env.OUTPUT_FILENAME }}
326+
asset_name: ${{ env.OUTPUT_FILENAME }}
327+
asset_content_type: application/gzip
309328

310329
publish-release:
311330
permissions:

0 commit comments

Comments
 (0)