Skip to content

feat: rename to AssetsAndMapEditor, add CI/CD pipeline, mismatch filt… #1

feat: rename to AssetsAndMapEditor, add CI/CD pipeline, mismatch filt…

feat: rename to AssetsAndMapEditor, add CI/CD pipeline, mismatch filt… #1

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*'
permissions:
contents: write
jobs:
build:
strategy:
matrix:
include:
- os: windows-latest
rid: win-x64
artifact: AssetsAndMapEditor-Win64
- os: macos-latest
rid: osx-arm64
artifact: AssetsAndMapEditor-macOS-ARM64
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.x'
- name: Restore
run: dotnet restore src/App/AssetsAndMapEditor.App.csproj -r ${{ matrix.rid }}
- name: Publish
run: >
dotnet publish src/App/AssetsAndMapEditor.App.csproj
-c Release
-r ${{ matrix.rid }}
--self-contained true
-p:PublishSingleFile=true
-p:IncludeNativeLibrariesForSelfExtract=true
-o publish/${{ matrix.artifact }}
- name: Zip (Windows)
if: runner.os == 'Windows'
run: Compress-Archive -Path publish/${{ matrix.artifact }}/* -DestinationPath ${{ matrix.artifact }}.zip
- name: Zip (macOS)
if: runner.os == 'macOS'
run: cd publish/${{ matrix.artifact }} && zip -r ../../${{ matrix.artifact }}.zip .
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact }}
path: ${{ matrix.artifact }}.zip
release:
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
- name: Extract changelog for tag
id: changelog
run: |
TAG="${GITHUB_REF#refs/tags/}"
# Extract the section for this tag from CHANGELOG.md
BODY=$(awk "/^## \\[${TAG//./\\.}\\]/{found=1; next} /^## \\[/{if(found) exit} found" CHANGELOG.md)
if [ -z "$BODY" ]; then
BODY="Release ${TAG}"
fi
# Write to file for the release body
echo "$BODY" > release_notes.md
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
body_path: release_notes.md
files: |
artifacts/AssetsAndMapEditor-Win64/AssetsAndMapEditor-Win64.zip
artifacts/AssetsAndMapEditor-macOS-ARM64/AssetsAndMapEditor-macOS-ARM64.zip