Skip to content

.github/workflows/be-release.yml #9

.github/workflows/be-release.yml

.github/workflows/be-release.yml #9

Workflow file for this run

permissions:
contents: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
pull_request:
paths:
- '.github/workflows/release.yml'
push:
tags:
- 'v*'
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
jobs:
release:
strategy:
matrix:
os: [ubuntu-20.04, ubuntu-22.04]
runs-on: ["${{ matrix.os }}"]
steps:
- uses: actions/checkout@v4
- uses: fanatid/rust-github-ci-prepare@master
- name: build binaries
run: cargo build --bin solfees-be --bin solfees-grpc2redis --bin solfees-ws-client --release
- name: rename binaries
run: |
mv target/release/solfees-be target/release/solfees-be-${{ matrix.os }}
mv target/release/solfees-grpc2redis target/release/solfees-grpc2redis-${{ matrix.os }}
mv target/release/solfees-ws-client target/release/solfees-ws-client-${{ matrix.os }}
- name: upload artifact
if: startsWith(github.ref, 'refs/tags/') != true
uses: actions/upload-artifact@v4
with:
name: binaries-${{ github.sha }}-${{ matrix.os }}
path: |
target/release/solfees-be-${{ matrix.os }}
target/release/solfees-grpc2redis-${{ matrix.os }}
target/release/solfees-ws-client-${{ matrix.os }}
- name: upload release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v2
with:
fail_on_unmatched_files: true
files: |
target/release/solfees-be-${{ matrix.os }}
target/release/solfees-grpc2redis-${{ matrix.os }}
target/release/solfees-ws-client-${{ matrix.os }}