Skip to content

Publish RainbowFrame [Release] #1

Publish RainbowFrame [Release]

Publish RainbowFrame [Release] #1

Workflow file for this run

name: Publish RainbowFrame [Release]
on:
workflow_dispatch:
env:
PROJECT_PATH: dev/RainbowFrame.csproj
DIR_PATH: publish
APPNAME: RainbowFrame
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
with:
dotnet-version: '8.0.x'
fetch-depth: 0
- name: Get ${{ env.PROJECT_PATH }} Version
uses: kzrnm/[email protected]
id: get-version
with:
proj-path: ${{ env.APPNAME }}
- name: Build and Publish ${{ env.APPNAME }}
run: dotnet publish ${{ env.PROJECT_PATH }} -c Release -r win10-x64 -p:Platform=x64 --self-contained true -p:PublishSingleFile=false -p:PublishReadyToRun=true -p:PublishTrimmed=false --output publish
- name: Zip Publish Folder
uses: vimtor/[email protected]
with:
files: ${{ env.DIR_PATH }}
recursive: true
dest: publish/${{ env.APPNAME }}-v${{steps.get-version.outputs.version}}-x64.zip
- name: Create Github Release
uses: actions/[email protected]
id: create_release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VersionName: v${{steps.get-version.outputs.version}}
with:
tag_name: ${{ env.VersionName }}
release_name: ${{ env.VersionName }}
- name: Upload Zip file to Github Release
uses: csexton/release-asset-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
file: publish/${{ env.APPNAME }}-v${{steps.get-version.outputs.version}}-x64.zip
release-url: ${{ steps.create_release.outputs.upload_url }}
changelog:
needs: build
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Get ${{ env.APPNAME }} Version
uses: kzrnm/[email protected]
id: get-version
with:
proj-path: ${{ env.PROJECT_PATH }}
- name: Install auto-changelog Package
run: npm install -g auto-changelog
- name: Generate CHANGELOG.md
run: auto-changelog --commit-limit false --starting-version v${{steps.get-version.outputs.version}} --ending-version v${{steps.get-version.outputs.version}} --hide-credit
- name: Get Latest Github Release
id: latest_release
uses: kaliber5/action-get-release@v1
with:
token: ${{ github.token }}
latest: true
- name: Read CHANGELOG.md Content
id: changelog
uses: jaywcjlove/github-action-read-file@main
with:
localfile: CHANGELOG.md
- name: Update Github Release with CHANGELOG.md
uses: kaliber5/action-update-release@v1
with:
token: ${{ github.token }}
id: ${{ steps.latest_release.outputs.id }}
body: ${{ steps.changelog.outputs.content }}