Skip to content

fix error when no recipients #7

fix error when no recipients

fix error when no recipients #7

Workflow file for this run

name: Build and Release .NET App
on:
push:
tags:
- 'v*'
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
working-directory: ./sherlog-cli
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0' # Specify your .NET version here
- name: Build self-contained binary for osx-arm64
run: dotnet publish -c Release -r osx-arm64 --self-contained true -p:PublishSingleFile=true -o ./publish/osx-arm64
- name: Build self-contained binary for osx-x64
run: dotnet publish -c Release -r osx-x64 --self-contained true -p:PublishSingleFile=true -o ./publish/osx-x64
- name: Build self-contained binary for linux-x64
run: dotnet publish -c Release -r linux-x64 --self-contained true -p:PublishSingleFile=true -o ./publish/linux-x64
- name: Build self-contained binary for linux-arm64
run: dotnet publish -c Release -r linux-arm64 --self-contained true -p:PublishSingleFile=true -o ./publish/linux-arm64
- name: Zip the binaries
run: zip -r sherlog-cli-bin.zip ./publish
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
body: "Release of version ${{ github.ref }}"
- name: Upload Release Asset osx-arm64
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./sherlog-cli/publish/osx-arm64/sherlog-cli
asset_name: sherlog-cli-osx-arm64
asset_content_type: application/octet-stream
- name: Upload Release Asset osx-x64
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./sherlog-cli/publish/osx-x64/sherlog-cli
asset_name: sherlog-cli-osx-x64
asset_content_type: application/octet-stream
- name: Upload Release Asset linux-x64
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./sherlog-cli/publish/linux-x64/sherlog-cli
asset_name: sherlog-cli-linux-x64
asset_content_type: application/octet-stream
- name: Upload Release Asset linux-arm64
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./sherlog-cli/publish/linux-arm64/sherlog-cli
asset_name: sherlog-cli-linux-arm64
asset_content_type: application/octet-stream
- name: Upload Release Asset ZIP
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./sherlog-cli/sherlog-cli-bin.zip
asset_name: sherlog-cli-bin.zip
asset_content_type: application/zip