mirror of
https://github.com/PepperDash/EssentialsPluginTemplate.git
synced 2026-07-02 08:38:14 +00:00
removed workflow
This commit is contained in:
parent
d664e36a05
commit
335bc15809
7 changed files with 0 additions and 370 deletions
34
.github/ISSUE_TEMPLATE/bug_report.md
vendored
34
.github/ISSUE_TEMPLATE/bug_report.md
vendored
|
|
@ -1,34 +0,0 @@
|
||||||
---
|
|
||||||
name: Bug report
|
|
||||||
about: Create a report to help us improve
|
|
||||||
title: "[BUG]-"
|
|
||||||
labels: bug
|
|
||||||
assignees: ''
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
**Describe the bug**
|
|
||||||
A clear and concise description of what the bug is.
|
|
||||||
|
|
||||||
**Stacktrace**
|
|
||||||
|
|
||||||
Include a stack trace of the exception if possible.
|
|
||||||
```
|
|
||||||
Paste stack trace here
|
|
||||||
```
|
|
||||||
|
|
||||||
**To Reproduce**
|
|
||||||
Steps to reproduce the behavior:
|
|
||||||
1. Go to '...'
|
|
||||||
2. Click on '....'
|
|
||||||
3. Scroll down to '....'
|
|
||||||
4. See error
|
|
||||||
|
|
||||||
**Expected behavior**
|
|
||||||
A clear and concise description of what you expected to happen.
|
|
||||||
|
|
||||||
**Screenshots**
|
|
||||||
If applicable, add screenshots to help explain your problem.
|
|
||||||
|
|
||||||
**Additional context**
|
|
||||||
Add any other context about the problem here.
|
|
||||||
21
.github/ISSUE_TEMPLATE/feature_request.md
vendored
21
.github/ISSUE_TEMPLATE/feature_request.md
vendored
|
|
@ -1,21 +0,0 @@
|
||||||
---
|
|
||||||
name: Feature request
|
|
||||||
about: Suggest an idea for this project
|
|
||||||
title: "[FEATURE]-"
|
|
||||||
labels: enhancement
|
|
||||||
assignees: ''
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
**Is your feature request related to a problem? Please describe.**
|
|
||||||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
|
||||||
If this is a request for support for a new device or type, be as specific as possible and include any pertinent manufacturer and model information.
|
|
||||||
|
|
||||||
**Describe the solution you'd like**
|
|
||||||
A clear and concise description of what you want to happen.
|
|
||||||
|
|
||||||
**Describe alternatives you've considered**
|
|
||||||
A clear and concise description of any alternative solutions or features you've considered.
|
|
||||||
|
|
||||||
**Additional context**
|
|
||||||
Add any other context or screenshots about the feature request here.
|
|
||||||
43
.github/scripts/GenerateVersionNumber.ps1
vendored
43
.github/scripts/GenerateVersionNumber.ps1
vendored
|
|
@ -1,43 +0,0 @@
|
||||||
$latestVersions = $(git tag --merged origin/master)
|
|
||||||
$latestVersion = [version]"0.0.0"
|
|
||||||
Foreach ($version in $latestVersions) {
|
|
||||||
Write-Host $version
|
|
||||||
try {
|
|
||||||
if (([version]$version) -ge $latestVersion) {
|
|
||||||
$latestVersion = $version
|
|
||||||
Write-Host "Setting latest version to: $latestVersion"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch {
|
|
||||||
Write-Host "Unable to convert $($version). Skipping"
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$newVersion = [version]$latestVersion
|
|
||||||
$phase = ""
|
|
||||||
$newVersionString = ""
|
|
||||||
switch -regex ($Env:GITHUB_REF) {
|
|
||||||
'^refs\/heads\/master*.' {
|
|
||||||
$newVersionString = "{0}.{1}.{2}" -f $newVersion.Major, $newVersion.Minor, $newVersion.Build
|
|
||||||
}
|
|
||||||
'^refs\/heads\/feature\/*.' {
|
|
||||||
$phase = 'alpha'
|
|
||||||
$newVersionString = "{0}.{1}.{2}-{3}-{4}" -f $newVersion.Major, $newVersion.Minor, ($newVersion.Build + 1), $phase, $Env:GITHUB_RUN_NUMBER
|
|
||||||
}
|
|
||||||
'^refs\/heads\/release\/*.' {
|
|
||||||
$phase = 'rc'
|
|
||||||
$newVersionString = "{0}.{1}.{2}-{3}-{4}" -f $newVersion.Major, $newVersion.Minor, ($newVersion.Build + 1), $phase, $Env:GITHUB_RUN_NUMBER
|
|
||||||
}
|
|
||||||
'^refs\/heads\/development*.' {
|
|
||||||
$phase = 'beta'
|
|
||||||
$newVersionString = "{0}.{1}.{2}-{3}-{4}" -f $newVersion.Major, $newVersion.Minor, ($newVersion.Build + 1), $phase, $Env:GITHUB_RUN_NUMBER
|
|
||||||
}
|
|
||||||
'^refs\/heads\/hotfix\/*.' {
|
|
||||||
$phase = 'hotfix'
|
|
||||||
$newVersionString = "{0}.{1}.{2}-{3}-{4}" -f $newVersion.Major, $newVersion.Minor, ($newVersion.Build + 1), $phase, $Env:GITHUB_RUN_NUMBER
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
Write-Output $newVersionString
|
|
||||||
40
.github/scripts/UpdateAssemblyVersion.ps1
vendored
40
.github/scripts/UpdateAssemblyVersion.ps1
vendored
|
|
@ -1,40 +0,0 @@
|
||||||
function Update-SourceVersion {
|
|
||||||
Param ([string]$Version)
|
|
||||||
#$fullVersion = $Version
|
|
||||||
$baseVersion = [regex]::Match($Version, "(\d+.\d+.\d+).*").captures.groups[1].value
|
|
||||||
$NewAssemblyVersion = ‘AssemblyVersion("‘ + $baseVersion + ‘.*")’
|
|
||||||
Write-Output "AssemblyVersion = $NewAssemblyVersion"
|
|
||||||
$NewAssemblyInformationalVersion = ‘AssemblyInformationalVersion("‘ + $Version + ‘")’
|
|
||||||
Write-Output "AssemblyInformationalVersion = $NewAssemblyInformationalVersion"
|
|
||||||
|
|
||||||
foreach ($o in $input) {
|
|
||||||
Write-output $o.FullName
|
|
||||||
$TmpFile = $o.FullName + “.tmp”
|
|
||||||
get-content $o.FullName |
|
|
||||||
ForEach-Object {
|
|
||||||
$_ -replace ‘AssemblyVersion\(".*"\)’, $NewAssemblyVersion } |
|
|
||||||
ForEach-Object {
|
|
||||||
$_ -replace ‘AssemblyInformationalVersion\(".*"\)’, $NewAssemblyInformationalVersion
|
|
||||||
} > $TmpFile
|
|
||||||
move-item $TmpFile $o.FullName -force
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function Update-AllAssemblyInfoFiles ( $version ) {
|
|
||||||
foreach ($file in “AssemblyInfo.cs”, “AssemblyInfo.vb” ) {
|
|
||||||
get-childitem -Path $Env:GITHUB_WORKSPACE -recurse | Where-Object { $_.Name -eq $file } | Update-SourceVersion $version ;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# validate arguments
|
|
||||||
$r = [System.Text.RegularExpressions.Regex]::Match($args[0], "\d+\.\d+\.\d+.*");
|
|
||||||
if ($r.Success) {
|
|
||||||
Write-Output "Updating Assembly Version to $args ...";
|
|
||||||
Update-AllAssemblyInfoFiles $args[0];
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
Write-Output ” “;
|
|
||||||
Write-Output “Error: Input version does not match x.y.z format!”
|
|
||||||
Write-Output ” “;
|
|
||||||
Write-Output "Unable to apply version to AssemblyInfo.cs files";
|
|
||||||
}
|
|
||||||
41
.github/scripts/ZipBuildOutput.ps1
vendored
41
.github/scripts/ZipBuildOutput.ps1
vendored
|
|
@ -1,41 +0,0 @@
|
||||||
# Uncomment these for local testing
|
|
||||||
# $Env:GITHUB_WORKSPACE = "C:\Working Directories\PD\essentials"
|
|
||||||
# $Env:SOLUTION_FILE = "PepperDashEssentials"
|
|
||||||
# $Env:VERSION = "0.0.0-buildType-test"
|
|
||||||
|
|
||||||
# Sets the root directory for the operation
|
|
||||||
$destination = "$($Env:GITHUB_HOME)\output"
|
|
||||||
New-Item -ItemType Directory -Force -Path ($destination)
|
|
||||||
Get-ChildItem ($destination)
|
|
||||||
$exclusions = @(git submodule foreach --quiet 'echo $name')
|
|
||||||
# Trying to get any .json schema files (not currently working)
|
|
||||||
# Gets any files with the listed extensions.
|
|
||||||
Get-ChildItem -recurse -Path "$($Env:GITHUB_WORKSPACE)" -include "*.clz", "*.cpz", "*.cplz" | ForEach-Object {
|
|
||||||
$allowed = $true;
|
|
||||||
# Exclude any files in submodules
|
|
||||||
foreach ($exclude in $exclusions) {
|
|
||||||
if ((Split-Path $_.FullName -Parent).contains("$($exclude)")) {
|
|
||||||
$allowed = $false;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if ($allowed) {
|
|
||||||
Write-Host "allowing $($_)"
|
|
||||||
$_;
|
|
||||||
}
|
|
||||||
} | Copy-Item -Destination ($destination) -Force
|
|
||||||
Write-Host "Getting matching files..."
|
|
||||||
# Get any files from the output folder that match the following extensions
|
|
||||||
Get-ChildItem -Path $destination | Where-Object {($_.Extension -eq ".clz") -or ($_.Extension -eq ".cpz" -or ($_.Extension -eq ".cplz"))} | ForEach-Object {
|
|
||||||
# Replace the extensions with dll and xml and create an array
|
|
||||||
$filenames = @($($_ -replace "cpz|clz|cplz", "dll"), $($_ -replace "cpz|clz|cplz", "xml"))
|
|
||||||
Write-Host "Filenames:"
|
|
||||||
Write-Host $filenames
|
|
||||||
if ($filenames.length -gt 0) {
|
|
||||||
# Attempt to get the files and return them to the output directory
|
|
||||||
Get-ChildItem -Recurse -Path "$($Env:GITHUB_WORKSPACE)" -include $filenames | Copy-Item -Destination ($destination) -Force
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Compress-Archive -Path $destination -DestinationPath "$($Env:GITHUB_WORKSPACE)\$($Env:SOLUTION_FILE)-$($Env:VERSION).zip" -Force
|
|
||||||
Write-Host "Output Contents post Zip"
|
|
||||||
Get-ChildItem -Path $destination
|
|
||||||
95
.github/workflows/docker.yml
vendored
95
.github/workflows/docker.yml
vendored
|
|
@ -1,95 +0,0 @@
|
||||||
name: Branch Build Using Docker
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- feature/*
|
|
||||||
- hotfix/*
|
|
||||||
- release/*
|
|
||||||
- development
|
|
||||||
|
|
||||||
env:
|
|
||||||
# solution path doesn't need slashes unless there it is multiple folders deep
|
|
||||||
# solution name does not include extension. .sln is assumed
|
|
||||||
SOLUTION_PATH: PDT.EssentialsPluginTemplate.EPI
|
|
||||||
SOLUTION_FILE: PDT.EssentialsPluginTemplate.EPI
|
|
||||||
# Do not edit this, we're just creating it here
|
|
||||||
VERSION: 0.0.0-buildtype-buildnumber
|
|
||||||
# Defaults to debug for build type
|
|
||||||
BUILD_TYPE: Debug
|
|
||||||
# Defaults to master as the release branch. Change as necessary
|
|
||||||
RELEASE_BRANCH: master
|
|
||||||
jobs:
|
|
||||||
Build_Project:
|
|
||||||
runs-on: windows-latest
|
|
||||||
steps:
|
|
||||||
# First we checkout the source repo
|
|
||||||
- name: Checkout repo
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
# And any submodules
|
|
||||||
- name: Checkout submodules
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
git config --global url."https://github.com/".insteadOf "git@github.com:"
|
|
||||||
auth_header="$(git config --local --get http.https://github.com/.extraheader)"
|
|
||||||
git submodule sync --recursive
|
|
||||||
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
|
|
||||||
# Set the BUILD_TYPE environment variable
|
|
||||||
- name: Set Build to Release if triggered from Master
|
|
||||||
run: |
|
|
||||||
if("$($Env:GITHUB_REF)".contains("$($Env:RELEASE_BRANCH)")) {
|
|
||||||
Write-Host "Setting build type to Release"
|
|
||||||
Write-Output "::set-env name=BUILD_TYPE::Release"
|
|
||||||
}
|
|
||||||
# Fetch all tags
|
|
||||||
- name: Fetch tags
|
|
||||||
run: git fetch --tags
|
|
||||||
# Generate the appropriate version number
|
|
||||||
- name: Set Version Number
|
|
||||||
shell: powershell
|
|
||||||
run: |
|
|
||||||
$version = ./.github/scripts/GenerateVersionNumber.ps1
|
|
||||||
Write-Output "::set-env name=VERSION::$version"
|
|
||||||
# Use the version number to set the version of the assemblies
|
|
||||||
- name: Update AssemblyInfo.cs
|
|
||||||
shell: powershell
|
|
||||||
run: |
|
|
||||||
Write-Output ${{ env.VERSION }}
|
|
||||||
./.github/scripts/UpdateAssemblyVersion.ps1 ${{ env.VERSION }}
|
|
||||||
# Build the solutions in the docker image
|
|
||||||
- name: Build Solution
|
|
||||||
shell: powershell
|
|
||||||
run: |
|
|
||||||
Invoke-Expression "docker run --rm --mount type=bind,source=""$($Env:GITHUB_WORKSPACE)"",target=""c:/project"" pepperdash/sspbuilder c:\cihelpers\vsidebuild.exe -Solution ""c:\project\$($Env:SOLUTION_PATH)\$($Env:SOLUTION_FILE).sln"" -BuildSolutionConfiguration $($ENV:BUILD_TYPE)"
|
|
||||||
# Zip up the output files as needed
|
|
||||||
- name: Zip Build Output
|
|
||||||
shell: powershell
|
|
||||||
run: ./.github/scripts/ZipBuildOutput.ps1
|
|
||||||
- name: Upload Build Output
|
|
||||||
uses: actions/upload-artifact@v1
|
|
||||||
with:
|
|
||||||
name: Build
|
|
||||||
path: ./${{ env.SOLUTION_FILE}}-${{ env.VERSION}}.zip
|
|
||||||
# Create the release on the source repo
|
|
||||||
- name: Create Release
|
|
||||||
id: create_release
|
|
||||||
uses: actions/create-release@v1
|
|
||||||
with:
|
|
||||||
tag_name: ${{ env.VERSION }}
|
|
||||||
release_name: ${{ env.VERSION }}
|
|
||||||
prerelease: ${{contains('debug', env.BUILD_TYPE)}}
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
# Upload the build package to the release
|
|
||||||
- name: Upload Release Package
|
|
||||||
id: upload_release
|
|
||||||
uses: actions/upload-release-asset@v1
|
|
||||||
with:
|
|
||||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
||||||
asset_path: ./${{ env.SOLUTION_FILE}}-${{ env.VERSION}}.zip
|
|
||||||
asset_name: ${{ env.SOLUTION_FILE}}-${{ env.VERSION}}.zip
|
|
||||||
asset_content_type: application/zip
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
96
.github/workflows/master build.yml
vendored
96
.github/workflows/master build.yml
vendored
|
|
@ -1,96 +0,0 @@
|
||||||
name: Master Build using Docker
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
tags:
|
|
||||||
- 0.*
|
|
||||||
- 1.*
|
|
||||||
- 2.*
|
|
||||||
- 3.*
|
|
||||||
|
|
||||||
env:
|
|
||||||
# solution path doesn't need slashes unless there it is multiple folders deep
|
|
||||||
# solution name does not include extension. .sln is assumed
|
|
||||||
SOLUTION_PATH: PDT.EssentialsPluginTemplate.EPI
|
|
||||||
SOLUTION_FILE: PDT.EssentialsPluginTemplate.EPI
|
|
||||||
# Do not edit this, we're just creating it here
|
|
||||||
VERSION: 0.0.0-buildtype-buildnumber
|
|
||||||
# Defaults to debug for build type
|
|
||||||
BUILD_TYPE: Debug
|
|
||||||
# Defaults to master as the release branch. Change as necessary
|
|
||||||
RELEASE_BRANCH: master
|
|
||||||
jobs:
|
|
||||||
Build_Project:
|
|
||||||
if: env.GITHUB_REF == 'refs/heads/master'
|
|
||||||
runs-on: windows-latest
|
|
||||||
steps:
|
|
||||||
# First we checkout the source repo
|
|
||||||
- name: Checkout repo
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
# And any submodules
|
|
||||||
- name: Checkout submodules
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
git config --global url."https://github.com/".insteadOf "git@github.com:"
|
|
||||||
auth_header="$(git config --local --get http.https://github.com/.extraheader)"
|
|
||||||
git submodule sync --recursive
|
|
||||||
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
|
|
||||||
# Set the BUILD_TYPE environment variable
|
|
||||||
- name: Set Build to Release if triggered from Master
|
|
||||||
run: |
|
|
||||||
if("$($Env:GITHUB_REF)".contains("$($Env:RELEASE_BRANCH)")) {
|
|
||||||
Write-Host "Setting build type to Release"
|
|
||||||
Write-Output "::set-env name=BUILD_TYPE::Release"
|
|
||||||
}
|
|
||||||
# Fetch all tags
|
|
||||||
- name: Fetch tags
|
|
||||||
run: git fetch --tags
|
|
||||||
# Generate the appropriate version number
|
|
||||||
- name: Set Version Number
|
|
||||||
shell: powershell
|
|
||||||
run: |
|
|
||||||
$version = ./.github/scripts/GenerateVersionNumber.ps1
|
|
||||||
Write-Output "::set-env name=VERSION::$version"
|
|
||||||
# Use the version number to set the version of the assemblies
|
|
||||||
- name: Update AssemblyInfo.cs
|
|
||||||
shell: powershell
|
|
||||||
run: |
|
|
||||||
Write-Output ${{ env.VERSION }}
|
|
||||||
./.github/scripts/UpdateAssemblyVersion.ps1 ${{ env.VERSION }}
|
|
||||||
# Build the solutions in the docker image
|
|
||||||
- name: Build Solution
|
|
||||||
shell: powershell
|
|
||||||
run: |
|
|
||||||
Invoke-Expression "docker run --rm --mount type=bind,source=""$($Env:GITHUB_WORKSPACE)"",target=""c:/project"" pepperdash/sspbuilder c:\cihelpers\vsidebuild.exe -Solution ""c:\project\$($Env:SOLUTION_PATH)\$($Env:SOLUTION_FILE).sln"" -BuildSolutionConfiguration $($ENV:BUILD_TYPE)"
|
|
||||||
# Zip up the output files as needed
|
|
||||||
- name: Zip Build Output
|
|
||||||
shell: powershell
|
|
||||||
run: ./.github/scripts/ZipBuildOutput.ps1
|
|
||||||
- name: Upload Build Output
|
|
||||||
uses: actions/upload-artifact@v1
|
|
||||||
with:
|
|
||||||
name: Build
|
|
||||||
path: ./${{ env.SOLUTION_FILE}}-${{ env.VERSION}}.zip
|
|
||||||
# Create the release on the source repo
|
|
||||||
- name: Create Release
|
|
||||||
id: create_release
|
|
||||||
uses: actions/create-release@v1
|
|
||||||
with:
|
|
||||||
tag_name: ${{ env.VERSION }}
|
|
||||||
release_name: ${{ env.VERSION }}
|
|
||||||
prerelease: ${{contains('debug', env.BUILD_TYPE)}}
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
# Upload the build package to the release
|
|
||||||
- name: Upload Release Package
|
|
||||||
id: upload_release
|
|
||||||
uses: actions/upload-release-asset@v1
|
|
||||||
with:
|
|
||||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
||||||
asset_path: ./${{ env.SOLUTION_FILE}}-${{ env.VERSION}}.zip
|
|
||||||
asset_name: ${{ env.SOLUTION_FILE}}-${{ env.VERSION}}.zip
|
|
||||||
asset_content_type: application/zip
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue