mirror of
https://github.com/achiez/NebulaAuth-Steam-Desktop-Authenticator-by-Achies.git
synced 2026-07-25 06:14:31 +00:00
750292bfba
- Replaced old build-and-release.yml with a streamlined process in build-release.yml, simplifying release creation with dotnet publish, changelog conversion, and GitHub release automation. - Added prepare-release.yml to automate release preparation, including version extraction, update.xml generation, and tagging. - Introduced changelog for version 1.8.0 with a new HTML file (1.8.0.html) and external links to detailed updates. - Updated NebulaAuth.sln to include the new changelog file. - Refactored SetAccountPasswordsVM.cs to use localization for success messages and added a helper method for retrieving localized strings. - Enhanced localization.loc.json with new strings for SetAccountPasswordsVM and improved formatting by removing duplicates. - Improved changelog HTML structure and styles for better readability and mobile responsiveness. - Performed minor code cleanups and formatting adjustments.
79 lines
2.2 KiB
YAML
79 lines
2.2 KiB
YAML
name: Publish release
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- '*'
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
release:
|
|
runs-on: windows-latest
|
|
permissions:
|
|
contents: write
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Extract version
|
|
id: ver
|
|
run: echo "version=${GITHUB_REF_NAME}" >> $GITHUB_OUTPUT
|
|
shell: bash
|
|
|
|
- name: Setup .NET
|
|
uses: actions/setup-dotnet@v4
|
|
with:
|
|
dotnet-version: '8.0.x'
|
|
|
|
- name: Build NebulaAuth
|
|
run: dotnet publish src/NebulaAuth/NebulaAuth.csproj -c Release -o build
|
|
|
|
- name: Package release
|
|
run: |
|
|
cd build
|
|
powershell Compress-Archive * "../NebulaAuth.${env:GITHUB_REF_NAME}.zip"
|
|
shell: pwsh
|
|
|
|
- name: Install pandoc
|
|
run: |
|
|
choco install pandoc -y
|
|
|
|
- name: Convert changelog HTML to Markdown (ul-only)
|
|
id: changelog
|
|
shell: bash
|
|
run: |
|
|
version="${{ steps.ver.outputs.version }}"
|
|
file="changelog/${version}.html"
|
|
echo "Looking for file: $file"
|
|
|
|
if [ -f "$file" ]; then
|
|
echo "✅ File found, extracting <ul> section"
|
|
sed -n '/<ul>/,/<\/ul>/p' "$file" > body.html
|
|
|
|
echo "Converting with pandoc..."
|
|
pandoc body.html -f html -t markdown --wrap=none -o changelog.md
|
|
|
|
echo "-------- Converted changelog.md --------"
|
|
cat changelog.md
|
|
echo "----------------------------------------"
|
|
|
|
echo "body<<EOF" >> $GITHUB_OUTPUT
|
|
cat changelog.md >> $GITHUB_OUTPUT
|
|
echo "EOF" >> $GITHUB_OUTPUT
|
|
else
|
|
echo "❌ Changelog not found for version $version"
|
|
echo "body=No changelog found for $version" >> $GITHUB_OUTPUT
|
|
fi
|
|
|
|
- name: Create GitHub Release
|
|
uses: softprops/action-gh-release@v2
|
|
with:
|
|
tag_name: ${{ steps.ver.outputs.version }}
|
|
name: Release ${{ env.RELEASE_NAME }}
|
|
body: ${{ steps.changelog.outputs.body }}
|
|
files: |
|
|
NebulaAuth.${{ steps.ver.outputs.version }}.zip
|
|
env:
|
|
RELEASE_NAME: ${{ steps.ver.outputs.version }}
|