Add list
command (#26)
#15
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 'Release' | |
on: | |
push: | |
tags: | |
- v[0-9]+.[0-9]+.[0-9]+ | |
jobs: | |
build: | |
name: Build ${{ matrix.name }} | |
runs-on: ${{ matrix.runner }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- name: linux-amd64 | |
runner: ubuntu-latest | |
target: x86_64-unknown-linux-gnu | |
binary: ring-cli | |
- name: win-amd64 | |
runner: windows-latest | |
target: x86_64-pc-windows-msvc | |
binary: ring-cli.exe | |
- name: macos-amd64 | |
runner: macos-latest | |
target: x86_64-apple-darwin | |
binary: ring-cli | |
- name: macos-arm64 | |
runner: macos-latest | |
target: aarch64-apple-darwin | |
binary: ring-cli | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Rust | |
run: rustup toolchain install stable --profile minimal --target ${{ matrix.target }} | |
- name: Rust Cache | |
uses: Swatinem/rust-cache@v2 | |
- name: Build executable | |
run: cargo build --release --bin ring-cli --target ${{ matrix.target }} | |
- name: Rename binary | |
id: rename | |
shell: bash | |
run: | | |
binary="${{ startsWith(matrix.name, 'win') && 'ring-cli.exe' || 'ring-cli' }}" | |
result="${{ format(startsWith(matrix.name, 'win') && 'ring-{0}.exe' || 'ring-{0}', matrix.name) }}" | |
mv "target/${{ matrix.target }}/release/$binary" $result | |
echo "binary=$result" >> $GITHUB_OUTPUT | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: build-${{ matrix.name }} | |
path: ${{ steps.rename.outputs.binary }} | |
if-no-files-found: 'error' | |
release-notes: | |
name: Release notes | |
runs-on: ubuntu-latest | |
needs: [build] | |
permissions: | |
contents: write | |
steps: | |
- name: Read tag | |
id: info | |
run: | | |
tag=`echo '${{ github.ref }}' | cut -d / -f 3-` | |
echo version=`echo $tag | cut -d _ -f 2` >> $GITHUB_OUTPUT | |
- name: Download all artifacts | |
uses: actions/download-artifact@v4 | |
- name: Release | |
uses: softprops/action-gh-release@v2 | |
with: | |
name: ${{ steps.info.outputs.version }} | |
draft: true | |
generate_release_notes: true | |
files: | | |
build-linux-amd64/ring-linux-amd64 | |
build-win-amd64/ring-win-amd64.exe | |
build-macos-amd64/ring-macos-amd64 | |
build-macos-arm64/ring-macos-arm64 |