Skip to content

Commit

Permalink
compressing binary on CD
Browse files Browse the repository at this point in the history
  • Loading branch information
Sampaio Leal committed Feb 13, 2024
1 parent d7d1477 commit 46119f7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,15 @@ jobs:
uses: actions/download-artifact@v4
with:
name: butiko-binary
- name: Compress build artifact
run: xz butiko
- name: Create release
uses: actions/github-script@v7
with:
script: |
const fs = require("fs");
const { repo: { owner, repo }, sha } = context;
const data = fs.readFileSync("butiko");
const data = fs.readFileSync("butiko.xz");
const tag = context.ref.replace("refs/tags/", "");
const release = await github.rest.repos.createRelease({
Expand All @@ -100,6 +102,6 @@ jobs:
const asset = await github.rest.repos.uploadReleaseAsset({
owner, repo,
release_id: release.data.id,
name: `butiko_${tag}_linux_amd64`,
name: `butiko_${tag}_linux_amd64.xz`,
data,
});

0 comments on commit 46119f7

Please sign in to comment.