File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 6161 - name : Create tarball
6262 run : |
6363 cd dist
64- tar -czf devproc-${{ github.ref_name }}-${{ matrix.target }}.tar.gz --transform 's/devproc-${{ matrix.target }}/devproc/' devproc-${{ matrix.target }}
64+ # Rename binary to 'devproc' for the tarball
65+ mv devproc-${{ matrix.target }} devproc
66+ tar -czf devproc-${{ github.ref_name }}-${{ matrix.target }}.tar.gz devproc
6567 shasum -a 256 devproc-${{ github.ref_name }}-${{ matrix.target }}.tar.gz > devproc-${{ github.ref_name }}-${{ matrix.target }}.tar.gz.sha256
6668
6769 - name : Upload artifact
Original file line number Diff line number Diff line change @@ -71,11 +71,13 @@ async function buildTarget(target: Target): Promise<string> {
7171async function createTarball ( binaryPath : string , target : Target ) : Promise < string > {
7272 const tarballName = `devproc-v${ VERSION } -${ target . name } .tar.gz` ;
7373 const tarballPath = join ( DIST_DIR , tarballName ) ;
74- const binaryName = target . outputName ;
75-
76- // Create tarball with just the binary renamed to 'devproc'
77- await $ `tar -czf ${ tarballPath } -C ${ DIST_DIR } --transform 's/${ binaryName } /devproc/' ${ binaryName } ` ;
78-
74+ const renamedBinary = join ( DIST_DIR , "devproc" ) ;
75+
76+ // Rename binary to 'devproc' for the tarball (portable across BSD/GNU tar)
77+ await $ `mv ${ binaryPath } ${ renamedBinary } ` ;
78+ await $ `tar -czf ${ tarballPath } -C ${ DIST_DIR } devproc` ;
79+ await $ `mv ${ renamedBinary } ${ binaryPath } ` ;
80+
7981 console . log ( ` ✓ Created ${ tarballName } ` ) ;
8082 return tarballPath ;
8183}
You can’t perform that action at this time.
0 commit comments