Skip to content

Merge pull request #27 from woutervanranst/fix-console-progress #29

Merge pull request #27 from woutervanranst/fix-console-progress

Merge pull request #27 from woutervanranst/fix-console-progress #29

Workflow file for this run

name: 🚀 Release
on:
push:
tags:
- "v*"
permissions:
contents: write
jobs:
test:
uses: ./.github/workflows/ci.yml
secrets: inherit
build:
name: 📦 Build (${{ matrix.rid }})
needs: test
strategy:
matrix:
include:
- os: windows-latest
rid: win-x64
- os: ubuntu-latest
rid: linux-x64
- os: macos-latest
rid: osx-arm64
runs-on: ${{ matrix.os }}
steps:
- name: 🛎️ Checkout
uses: actions/checkout@v6
- name: ⚙️ Setup .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: "10.0.x"
- name: 🏷️ Extract version from tag
id: version
shell: bash
run: echo "version=${GITHUB_REF_NAME#v}" >> "$GITHUB_OUTPUT"
- name: 🔨 Publish self-contained binary
run: >
dotnet publish src/Arius.Cli/Arius.Cli.csproj
-c Release
-r ${{ matrix.rid }}
--self-contained true
-o publish
-p:Version=${{ steps.version.outputs.version }}
-p:PublishSingleFile=true
-p:IncludeNativeLibrariesForSelfExtract=true
-p:DebugType=none
- name: ✏️ Rename binary
shell: bash
run: |
if [[ "${{ matrix.rid }}" == win-* ]]; then
mv publish/Arius.Cli.exe arius-${{ matrix.rid }}.exe
else
mv publish/Arius.Cli arius-${{ matrix.rid }}
fi
- name: ⬆️ Upload artifact
uses: actions/upload-artifact@v7
with:
name: binary-${{ matrix.rid }}
path: arius-${{ matrix.rid }}*
release:
name: 🎉 Publish Release
needs: build
runs-on: ubuntu-latest
steps:
- name: 🛎️ Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: 🏷️ Extract version from tag
id: version
shell: bash
run: echo "version=${GITHUB_REF_NAME#v}" >> "$GITHUB_OUTPUT"
- name: 📝 Generate release notes
uses: orhun/git-cliff-action@v4
with:
config: cliff.toml
args: --latest --strip header
env:
OUTPUT: CHANGELOG.md
- name: ⬇️ Download release artifacts
uses: actions/download-artifact@v8
with:
path: dist/
pattern: binary-*
merge-multiple: true
- name: 🚀 Create GitHub Release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release create ${{ github.ref_name }} \
--repo ${{ github.repository }} \
--title "Arius ${{ steps.version.outputs.version }}" \
--notes-file CHANGELOG.md \
dist/*