Skip to content

make console output prettier #25

make console output prettier

make console output prettier #25

Workflow file for this run

name: Publish Release
on:
push:
branches: [ "main" ]
workflow_dispatch:
permissions:
contents: write
actions: read
packages: write
id-token: write
checks: write
issues: write
pull-requests: write
jobs:
build-releases:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
# Compute the version tag
- name: Compute Tag
id: compute_tag
uses: craig-day/compute-tag@v18
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
version_type: patch
# Remove the initial v from the tag
- name: Remove v from tag
id: remove_v
run: |
$tag = "${{ steps.compute_tag.outputs.next_tag }}"
$tag = $tag -replace '^v', ''
echo "::set-output name=next_tag::$tag"
# Install the .NET SDK workload
- name: Install .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '9.0.x'
- name: Install dependencies
run: dotnet restore
working-directory: src
- name: Build
run: dotnet build --configuration Release
working-directory: src
- name: Publish win-x64
run: dotnet publish TwitterSky\TwitterSky.csproj --configuration Release -r win-x64 --no-restore --self-contained --output ./win-x64 /p:Version=${{ steps.remove_v.outputs.next_tag }}
working-directory: src
- name: Create release directory
run: mkdir release
working-directory: src
- name: Create win-x64 directory
run: mkdir release\win-x64
working-directory: src
- name: Create win-arm64 directory
run: mkdir release\win-arm64
working-directory: src
- name: Create Release Packages zip
run: Compress-Archive -Path src\win-x64\* -DestinationPath src/release/TwitterSky_win-x64_${{ steps.compute_tag.outputs.next_tag }}.zip
- name: Publish arm-x64
run: dotnet publish TwitterSky\TwitterSky.csproj --configuration Release -r win-arm64 --no-restore --self-contained --output ./win-arm64 /p:Version=${{ steps.remove_v.outputs.next_tag }}
working-directory: src
- name: Create Release Packages zip
run: Compress-Archive -Path src\win-arm64\* -DestinationPath src/release/TwitterSky_win-arm64_${{ steps.compute_tag.outputs.next_tag }}.zip
- name: Upload release assets
uses: softprops/action-gh-release@v2
with:
files: src/release/*.zip
tag_name: ${{ steps.compute_tag.outputs.next_tag }}
prerelease: false
generate_release_notes: true
name: TwitterSky ${{ steps.compute_tag.outputs.next_tag }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}