51 lines
1.2 KiB
YAML
51 lines
1.2 KiB
YAML
name: Publish Nym CLI binaries
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
release:
|
|
types: [created]
|
|
|
|
env:
|
|
NETWORK: mainnet
|
|
|
|
jobs:
|
|
publish-nym-cli:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
platform: [ubuntu-20.04, windows-latest, macos-latest]
|
|
|
|
runs-on: ${{ matrix.platform }}
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Check the release tag starts with `nym-cli-`
|
|
if: startsWith(github.ref, 'refs/tags/nym-cli-') == false && github.event_name != 'workflow_dispatch'
|
|
uses: actions/github-script@v3
|
|
with:
|
|
script: |
|
|
core.setFailed('Release tag did not start with nym-cli-...')
|
|
|
|
- name: Install Rust stable
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: stable
|
|
|
|
- name: Build binary
|
|
run: make build-nym-cli
|
|
|
|
- name: Upload Artifact
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: nym-cli-${{ matrix.platform }}
|
|
path: |
|
|
target/release/nym-cli*
|
|
retention-days: 30
|
|
|
|
- name: Upload to release based on tag name
|
|
uses: softprops/action-gh-release@v1
|
|
if: github.event_name == 'release'
|
|
with:
|
|
files: |
|
|
target/release/nym-cli
|