Skip to content

test release workflow #4

test release workflow

test release workflow #4

Workflow file for this run

name: Release
on:
push:
tags:
- '*'
permissions:
contents: write
jobs:
Cli:
runs-on: ubuntu-latest
name: SCI-CLI build and release
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup DotNet Environment
uses: actions/setup-dotnet@v4
with:
dotnet-version: '6.0.x'
# - name: Install dependencies
# run: dotnet restore
- name: Build
# run: dotnet build --configuration Release --no-restore
run: dotnet build --configuration Release
- name: Publish
run: dotnet publish ./SCICli/SCICli.csproj --configuration Release --output ./publish
- name: Get tag name
run: echo "TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
- name: Make artifacts
run: zip -j ./publish/SCICli-${{ env.TAG }}-win64.zip ./publish/SCICli.exe
- name: Generate checksum
run: |
echo "## Checksum for SCICli-${{ env.TAG }}-win64.zip" >> body.md
echo "| Checksum | Value |" >> body.md
echo "| -------- | ----- |" >> body.md
zipPath="./publish/SCICli-${{ env.TAG }}-win64.zip"
echo "| sha256 | $(sha256sum ${zipPath} | awk '{print $1}') |" >> body.md
echo "| sha1 | $(sha1sum ${zipPath} | awk '{print $1}') |" >> body.md
echo "| md5 | $(md5sum ${zipPath} | awk '{print $1}') |" >> body.md
- name: Upload to GitHub release
uses: ncipollo/release-action@v1
with:
artifacts: ./publish/SCICli-${{ env.TAG }}-win64.zip
bodyFile: body.md