Rename binary to swap

This commit is contained in:
Daniel Karzel 2021-03-05 16:14:21 +11:00
parent f8b61e2e0e
commit 196557b377
4 changed files with 11 additions and 14 deletions

View File

@ -60,11 +60,11 @@ jobs:
run: | run: |
cargo build -p swap --target ${{ matrix.target }} cargo build -p swap --target ${{ matrix.target }}
- name: Upload swap_cli binary - name: Upload swap binary
uses: actions/upload-artifact@v2-preview uses: actions/upload-artifact@v2-preview
with: with:
name: swap-${{ matrix.target }} name: swap-${{ matrix.target }}
path: target/${{ matrix.target }}/debug/swap_cli path: target/${{ matrix.target }}/debug/swap
- name: Upload asb binary - name: Upload asb binary
uses: actions/upload-artifact@v2-preview uses: actions/upload-artifact@v2-preview

View File

@ -1,4 +1,4 @@
name: "Release swap_cli" name: "Release swap"
on: on:
release: release:
@ -6,7 +6,7 @@ on:
jobs: jobs:
release: release:
name: Release swap_cli name: Release swap
strategy: strategy:
matrix: matrix:
include: include:
@ -30,10 +30,10 @@ jobs:
- uses: Swatinem/rust-cache@v1.2.0 - uses: Swatinem/rust-cache@v1.2.0
- name: Build ${{ matrix.target }} release binary - name: Build ${{ matrix.target }} release binary
run: cargo build --target=${{ matrix.target }} --release --package swap --bin swap_cli run: cargo build --target=${{ matrix.target }} --release --package swap --bin swap
- name: Smoke test the binary - name: Smoke test the binary
run: target/${{ matrix.target }}/release/swap_cli --help run: target/${{ matrix.target }}/release/swap --help
# Remove once python 3 is the default # Remove once python 3 is the default
- uses: actions/setup-python@v1 - uses: actions/setup-python@v1
@ -51,26 +51,26 @@ jobs:
triple = "${{ matrix.target }}".split("-") triple = "${{ matrix.target }}".split("-")
arch = triple[0] arch = triple[0]
archive_name=f'swap_cli_${{ github.event.release.tag_name }}_{os_info.system}_{arch}.${{ matrix.archive_ext }}' archive_name=f'swap_${{ github.event.release.tag_name }}_{os_info.system}_{arch}.${{ matrix.archive_ext }}'
print(f'::set-output name=archive::{archive_name}') print(f'::set-output name=archive::{archive_name}')
- name: Pack macos archive - name: Pack macos archive
if: matrix.os == 'macos-latest' if: matrix.os == 'macos-latest'
shell: bash shell: bash
run: gtar -C ./target/${{ matrix.target }}/release --create --file=${{ steps.create-archive-name.outputs.archive }} swap_cli run: gtar -C ./target/${{ matrix.target }}/release --create --file=${{ steps.create-archive-name.outputs.archive }} swap
- name: Pack linux archive - name: Pack linux archive
if: matrix.os == 'ubuntu-latest' if: matrix.os == 'ubuntu-latest'
shell: bash shell: bash
run: tar -C ./target/${{ matrix.target }}/release --create --file=${{ steps.create-archive-name.outputs.archive }} swap_cli run: tar -C ./target/${{ matrix.target }}/release --create --file=${{ steps.create-archive-name.outputs.archive }} swap
- name: Pack windows archive - name: Pack windows archive
if: matrix.os == 'windows-latest' if: matrix.os == 'windows-latest'
shell: bash shell: bash
run: | run: |
cp target/${{ matrix.target }}/release/swap_cli.exe ./swap_cli.exe cp target/${{ matrix.target }}/release/swap.exe ./swap.exe
7z a -tzip ${{ steps.create-archive-name.outputs.archive }} ./swap_cli.exe 7z a -tzip ${{ steps.create-archive-name.outputs.archive }} ./swap.exe
- name: Upload archive - name: Upload archive
uses: actions/upload-release-asset@v1 uses: actions/upload-release-asset@v1

View File

@ -5,9 +5,6 @@ authors = ["CoBloX developers <team@coblox.tech>"]
edition = "2018" edition = "2018"
description = "XMR/BTC trustless atomic swaps." description = "XMR/BTC trustless atomic swaps."
[[bin]]
name = "swap_cli"
[lib] [lib]
name = "swap" name = "swap"