Skip to content

Release CLI

Release CLI #22

Workflow file for this run

name: Release CLI
on:
workflow_dispatch:
inputs:
version:
required: true
type: string
description: "The version of the CLI to build (e.g. v1.6.0-beta.1)"
distinct_id:
type: string
description: "Distinct ID"
required: false
jobs:
build:
name: Release - ${{ matrix.platform.release_for }}
strategy:
matrix:
platform:
- release_for: linux-aarch64
os: ubuntu-20.04
target: aarch64-unknown-linux-gnu
bin: runtipi-cli
name: runtipi-cli-linux-arm64
command: build
- release_for: linux-x86_64
os: ubuntu-20.04
target: x86_64-unknown-linux-gnu
bin: runtipi-cli
name: runtipi-cli-linux-x64
command: build
# - release_for: macOS-aarch64
# os: macOS-latest
# target: aarch64-apple-darwin
# bin: runtipi-cli
# name: runtipi-cli-Darwin-aarch64
# command: build
runs-on: ${{ matrix.platform.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set version in src/assets/VERSION
run: |
echo "${{ inputs.version }}" > src/assets/VERSION
- name: Build binary
uses: houseabsolute/actions-rust-cross@v0
with:
command: ${{ matrix.platform.command }}
target: ${{ matrix.platform.target }}
args: "--locked --release"
strip: true
- name: List artifacts
run: ls -la .
- name: Upload CLI
uses: actions/upload-artifact@v4
with:
name: runtipi-cli-${{ matrix.platform.release_for }}
path: runtipi-cli-*
release:
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: runtipi-cli
- name: List artifacts
run: ls -la .
- uses: rickstaa/action-create-tag@v1
id: create-tag
with:
tag: ${{ inputs.version }}
- name: Create release
id: create_release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
body: |
**${{ inputs.version }}**
tag_name: ${{ inputs.version }}
name: ${{ inputs.version }}
draft: false
prerelease: true
files: runtipi-*/**