Skip to content

Commit

Permalink
[release] Fix for MP 1.33 x64
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewjswan committed Mar 19, 2024
1 parent 51a9671 commit c1750c5
Show file tree
Hide file tree
Showing 12 changed files with 169 additions and 414 deletions.
152 changes: 145 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ on:
default: 90
required: false
type: number
outputs:
version:
description: "MPE1 Version"
value: ${{ jobs.mpe.outputs.version }}

jobs:
build:
Expand Down Expand Up @@ -62,6 +66,7 @@ jobs:

codeql:
name: CodeQL
if: "contains(github.event.head_commit.message, '[release]')"
uses: andrewjswan/MPE/.github/workflows/codeql.yml@master
needs:
- build
Expand All @@ -74,14 +79,16 @@ jobs:
runs-on: windows-2019
needs:
- build
outputs:
version: ${{ steps.version.outputs.version }}
steps:
- name: Restore cache
uses: actions/cache/restore@v4
with:
path: ${{ github.workspace }}
key: plugin

- name: Git Checkout / MPE
- name: Git Checkout / MPE / XPath
uses: actions/checkout@v4
with:
repository: andrewjswan/MPE
Expand All @@ -103,6 +110,13 @@ jobs:
working-directory: ${{ github.workspace }}\builds
shell: cmd

- name: Get MPE1 Version
id: version
run: |
FOR /F "tokens=*" %%i IN ('Tools\sigcheck.exe -accepteula -nobanner -n "..\MQTTPlugin\bin\Release\MQTTPlugin.dll"') DO (ECHO version=%%i >> %GITHUB_OUTPUT%)
working-directory: ${{ github.workspace }}\scripts
shell: cmd

- name: Build MPE1
run: |
Create_Installer.bat
Expand All @@ -119,21 +133,121 @@ jobs:
retention-days: ${{ inputs.retention-build || 90 }}
if-no-files-found: error

cache-clear:
name: Clear cache
- name: Upload Artifact / MPE XML
uses: actions/upload-artifact@v4
if: ${{ success() && contains(github.event.head_commit.message, '[release]') }}
with:
name: MQTTPlugin XML
path: |
${{ github.workspace }}\scripts\MQTTPlugin.xml
retention-days: ${{ inputs.retention-build || 90 }}
if-no-files-found: error

- name: Get Release Version Description
if: ${{ success() && contains(github.event.head_commit.message, '[release]') }}
run: |
call ..\MPE\XPath\xpath.cmd "MQTTPlugin.xml" "//Items/PackageClass/GeneralInfo/VersionDescription" last > description.txt
working-directory: ${{ github.workspace }}\scripts
shell: cmd

- name: Upload Artifact / Version Description
uses: actions/upload-artifact@v4
if: ${{ success() && contains(github.event.head_commit.message, '[release]') }}
with:
name: MQTTPlugin Version Description
path: |
${{ github.workspace }}\scripts\description.txt
retention-days: ${{ inputs.retention-build || 90 }}
if-no-files-found: error

xml:
name: MQTT Plugin / XML
runs-on: ubuntu-latest
if: "contains(github.event.head_commit.message, '[release]')"
needs:
- mpe
permissions:
contents: write
steps:
- name: Clear cache
uses: easimon/wipe-cache@main
- name: Git Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Download Artifacts
uses: actions/download-artifact@v4
with:
name: MQTTPlugin XML
path: ${{ github.workspace }}/scripts/

- name: Update / MPE1 XML
uses: EndBug/add-and-commit@v9
with:
message: 'MQTT Plugin ${{needs.mpe.outputs.version}} / Release'
add: '${{ github.workspace }}/scripts/MQTTPlugin.xml'

- name: Delete XML Artifact
uses: geekyeggo/delete-artifact@v5
with:
name: MQTTPlugin XML
failOnError: false

release:
name: MQTT Plugin / Release
if: "contains(github.event.head_commit.message, '[release]')"
needs:
- mpe
- xml
permissions:
contents: write

runs-on: ubuntu-latest

steps:
- name: Download Artifacts
uses: actions/download-artifact@v4
with:
name: MQTTPlugin MPE1
path: release-files

- name: Download Artifacts
uses: actions/download-artifact@v4
with:
name: MQTTPlugin Version Description
path: release-description

- name: Check Artifacts
run: |
ls -l
working-directory: release-files

- name: Release
uses: softprops/action-gh-release@v2
with:
name: MQTT Plugin v${{needs.mpe.outputs.version}}
tag_name: v${{needs.mpe.outputs.version}}
body_path: release-description/description.txt
generate_release_notes: true
files: |
release-files/*.mpe1
- name: Delete MPE1 Artifact
uses: geekyeggo/delete-artifact@v5
with:
name: MQTTPlugin MPE1
failOnError: false

- name: Delete Version Description Artifact
uses: geekyeggo/delete-artifact@v5
with:
name: MQTTPlugin Version Description
failOnError: false

ci-status:
name: Status
name: Build Status
runs-on: ubuntu-latest
needs:
- build
- codeql
- mpe
if: always()
steps:
Expand All @@ -143,3 +257,27 @@ jobs:
- name: Failure
if: ${{ contains(needs.*.result, 'failure') }}
run: exit 1

release-status:
name: Release Status
if: "contains(github.event.head_commit.message, '[release]')"
runs-on: ubuntu-latest
needs:
- release
steps:
- name: Success
if: ${{ !(contains(needs.*.result, 'failure')) }}
run: exit 0
- name: Failure
if: ${{ contains(needs.*.result, 'failure') }}
run: exit 1

cache-clear:
name: Clear cache
runs-on: ubuntu-latest
needs:
- mpe
if: always()
steps:
- name: Clear cache
uses: easimon/wipe-cache@main
2 changes: 1 addition & 1 deletion MQTTPlugin/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("ajs")]
[assembly: AssemblyProduct("MQTTPlugin.Properties")]
[assembly: AssemblyCopyright("Copyright © 2020-2021")]
[assembly: AssemblyCopyright("Copyright © 2020-2024")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: CompatibleVersion("1.1.6.27644")]
Expand Down
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
# MQTTPlugin
[![Build status](https://ci.appveyor.com/api/projects/status/yj74bbhstsucwojj/branch/master?svg=true)](https://ci.appveyor.com/project/andrewjswan79536/mediaportal-mqttplugin/branch/master)
# MQTT Plugin
[![MP AnyCPU](https://img.shields.io/badge/MP-AnyCPU-blue?logo=windows&logoColor=white)](https://github.com/andrewjswan/MQTTPlugin/releases)
[![Build status](https://ci.appveyor.com/api/projects/status/l1b2t1str4f9b88c/branch/master?svg=true)](https://ci.appveyor.com/project/andrewjswan79536/MQTTPlugin/branch/master)
[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/andrewjswan/MQTTPlugin/build.yml?logo=github)](https://github.com/andrewjswan/MQTTPlugin/actions)
[![GitHub](https://img.shields.io/github/license/andrewjswan/MQTTPlugin?color=blue)](https://github.com/andrewjswan/MQTTPlugin/blob/master/LICENSE)
[![GitHub release (latest SemVer including pre-releases)](https://img.shields.io/github/v/release/andrewjswan/MQTTPlugin?include_prereleases)](https://github.com/andrewjswan/MQTTPlugin/releases)
[![GitHub release (latest by date including pre-releases)](https://img.shields.io/github/downloads-pre/andrewjswan/MQTTPlugin/latest/total?label=release@downloads)](https://github.com/andrewjswan/MQTTPlugin/releases)
[![StandWithUkraine](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/badges/StandWithUkraine.svg)](https://github.com/vshymanskyy/StandWithUkraine/blob/main/docs/README.md)

Mediaportal MQTT Plugin
Binary file removed builds/MQTTPlugin-1.0.0.1.MPE1
Binary file not shown.
Binary file removed builds/MQTTPlugin-1.0.0.5.mpe1
Binary file not shown.
Binary file removed builds/MQTTPlugin-1.0.0.7.mpe1
Binary file not shown.
8 changes: 8 additions & 0 deletions builds/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# MQTT Plugin

[![GitHub release (latest SemVer including pre-releases)](https://img.shields.io/github/v/release/andrewjswan/MQTTPlugin?include_prereleases)](https://github.com/andrewjswan/MQTTPlugin/releases)
[![GitHub release (latest by date including pre-releases)](https://img.shields.io/github/downloads-pre/andrewjswan/MQTTPlugin/latest/total?label=release@downloads)](https://github.com/andrewjswan/MQTTPlugin/releases)

Installation files in releases.


26 changes: 0 additions & 26 deletions scripts/Build_Debug_SVN.bat

This file was deleted.

26 changes: 0 additions & 26 deletions scripts/Build_SVN.bat

This file was deleted.

4 changes: 2 additions & 2 deletions scripts/Create_Installer.bat
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ FOR /F "tokens=*" %%i IN ('Tools\sigcheck.exe /accepteula /nobanner /n "..\MQTTP
:: Temp xmp2 file
copy /Y MQTTPlugin.xmp2 MQTTPluginTemp.xmp2

:: Sed "MQTTPlugin-{VERSION}.xml" from xmp2 file
Tools\sed.exe -i "s/MQTTPlugin-{VERSION}.xml/MQTTPlugin-%version%.xml/g" MQTTPluginTemp.xmp2
:: Sed "{VERSION}" from xmp2 file
Tools\sed.exe -i "s/{VERSION}/%version%/g" MQTTPluginTemp.xmp2

:: Build MPE1
"%PROGS%\Team MediaPortal\MediaPortal\MPEMaker.exe" MQTTPluginTemp.xmp2 /B /V=%version% /UpdateXML
Expand Down
14 changes: 8 additions & 6 deletions scripts/mqttplugin.xmp2 → scripts/MQTTPlugin.xmp2
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ ajs</Value>
<Author>ajs</Author>
<HomePage>https://github.com/andrewjswan/MQTTPlugin</HomePage>
<ForumPage>https://forum.team-mediaportal.com/threads/mqtt-plugin.140314/</ForumPage>
<UpdateUrl>https://github.com/andrewjswan/MQTTPlugin/master/scripts/mqttplugin.xml</UpdateUrl>
<UpdateUrl>https://raw.githubusercontent.com/andrewjswan/MQTTPlugin/master/scripts/MQTTPlugin.xml</UpdateUrl>
<Version>
<Major>1</Major>
<Minor>0</Minor>
Expand All @@ -264,10 +264,12 @@ ajs</Value>
<ExtensionDescription> Publish some Mediaportal statuses to MQTTBroker</ExtensionDescription>
<VersionDescription>Rebuild to support x86 and x64 architectures.
Support for Newtonsoft.Json.13.0.3
Fix for MP 1.33 x64</VersionDescription>
Fix for MP 1.33 x64

*** We Stand with Ukraine ***</VersionDescription>
<DevelopmentStatus>Stable</DevelopmentStatus>
<OnlineLocation>https://raw.githubusercontent.com/andrewjswan/MQTTPlugin/master/builds/MQTTPlugin-{VERSION}.MPE1</OnlineLocation>
<ReleaseDate>2024-03-02T15:04:24</ReleaseDate>
<OnlineLocation>https://github.com/andrewjswan/MQTTPlugin/releases/download/v{VERSION}/MQTTPlugin-{VERSION}.MPE1</OnlineLocation>
<ReleaseDate>2024-03-19T15:04:24</ReleaseDate>
<Tags>mqtt</Tags>
<PlatformCompatibility>AnyCPU</PlatformCompatibility>
<Location>..\builds\MQTTPlugin-MAJOR.MINOR.BUILD.REVISION.MPE1</Location>
Expand Down Expand Up @@ -344,8 +346,8 @@ Fix for MP 1.33 x64</VersionDescription>
</UniqueFileList>
<ProjectSettings>
<FolderGroups />
<ProjectFilename>mqttplugin.xmp2</ProjectFilename>
<UpdatePath1>MQTTPlugin-{VERSION}.xml</UpdatePath1>
<ProjectFilename>MQTTPlugin.xmp2</ProjectFilename>
<UpdatePath1>MQTTPlugin.xml</UpdatePath1>
<UpdatePath2 />
<UpdatePath3 />
</ProjectSettings>
Expand Down
Loading

0 comments on commit c1750c5

Please sign in to comment.