Skip to content

Commit

Permalink
Merge pull request #14 from derskythe/feat/ci
Browse files Browse the repository at this point in the history
Feat/ci
  • Loading branch information
derskythe authored Mar 28, 2023
2 parents 95a5914 + c948693 commit bdb3907
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 143 deletions.
14 changes: 13 additions & 1 deletion .github/check-version.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ $ErrorActionPreference = "Stop" #
[string]$ReleaseVersion = $args[1]
[string]$RepoSelf = $args[2]
[string]$RepoUnleashed = $args[3]
[bool]$ForGithubActions = $true

################################################################################################################################
function CleanInput
Expand Down Expand Up @@ -125,4 +126,15 @@ else
}

$Output.CurrentTag = $LatestTag
$Output

if($ForGithubActions) {
$Plain = New-Object -TypeName "System.Text.StringBuilder";
$Output.GetEnumerator() | ForEach-Object {
[void]$Plain.Append($_.Key)
[void]$Plain.Append('=')
[void]$Plain.AppendLine($_.Value)
}
Write-Output $Plain.ToString()
} else {
$Output
}
13 changes: 7 additions & 6 deletions .github/workflows/version-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,13 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
$Output = ('& $env:GITHUB_ACTION_PATH/.github/check-version.ps1')
Write-Output("RELEASE_VERSION=$($Output.ReleaseVersion)") >> $env:GITHUB_ENV
Write-Output("CURRENT_TAG=$($Output.CurrentTag)") >> $env:GITHUB_ENV
Write-Output("REMOTE_TAG_INFO=$($Output.RemoteTagInfo)") >> $env:GITHUB_ENV
Write-Output("RELEASE_TYPE=$($Output.ReleaseType)") >> $env:GITHUB_ENV
'& $env:GITHUB_ACTION_PATH/.github/check-version.ps1 "${{ env.FIRMWARE_VERSION }}" "${{ env.RELEASE_VERSION }}" "${{ env.REPO_SELF }}" "${{ env.REPO_UNLEASHED }}"' `
| Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
# $Output = ('& $env:GITHUB_ACTION_PATH/.github/check-version.ps1 "${{ env.FIRMWARE_VERSION }}" "${{ env.RELEASE_VERSION }}" "${{ env.REPO_SELF }}" "${{ env.REPO_UNLEASHED }}"')
# Write-Output("RELEASE_VERSION=$($Output.ReleaseVersion)") | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
# Write-Output("CURRENT_TAG=$($Output.CurrentTag)") | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
# Write-Output("REMOTE_TAG_INFO=$($Output.RemoteTagInfo)") | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
# Write-Output("RELEASE_TYPE=$($Output.ReleaseType)") | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
- name: Update Firmware variable and create UPDATE release if necessary
if: ${{ success() && env.RELEASE_TYPE == 1 }}
env:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/.idea/.idea.subbrute.dir/.idea/workspace.xml
136 changes: 0 additions & 136 deletions .idea/.idea.subbrute.dir/.idea/workspace.xml

This file was deleted.

0 comments on commit bdb3907

Please sign in to comment.