mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2024-10-01 01:45:40 -04:00
d88a235883
tar was producing an archived that binary that was failing to execute on developer machines. Since gtar is not available on windows or ubuntu, the windows and ubuntu releases was removed.
39 lines
1.2 KiB
YAML
39 lines
1.2 KiB
YAML
name: Create release archive
|
|
description: Creates a tar archive for a release binary
|
|
inputs:
|
|
version:
|
|
description: 'The version of the binary'
|
|
required: true
|
|
binary:
|
|
description: 'The name of the binary to pack into the archive'
|
|
required: true
|
|
target:
|
|
description: 'The target triple, used to find the binary; pass it if the compilation was done with the `--target` argument'
|
|
required: false
|
|
outputs:
|
|
archive:
|
|
description: 'The name of the archive'
|
|
value: ${{ steps.create-archive-name.outputs.archive }}
|
|
runs:
|
|
using: "composite"
|
|
steps:
|
|
- id: create-archive-name
|
|
shell: python # Use python to have a prettier name for the archive on Windows.
|
|
run: |
|
|
import platform
|
|
os_info = platform.uname()
|
|
|
|
arch = os_info.machine
|
|
|
|
if "${{ inputs.target }}":
|
|
triple = "${{ inputs.target }}".split("-")
|
|
arch = triple[0]
|
|
|
|
archive_name=f'${{ inputs.binary }}_${{ inputs.version }}_{os_info.system}_{arch}.tar'
|
|
|
|
print(f'::set-output name=archive::{archive_name}')
|
|
|
|
- name: Make archive
|
|
shell: bash
|
|
run: gtar -C ./target/${{ inputs.target }}/release --create --file=${{ steps.create-archive-name.outputs.archive }} ${{ inputs.binary }}
|