Skip to content

Commit

Permalink
Change trigger on build firmware and
Browse files Browse the repository at this point in the history
  • Loading branch information
derskythe committed Mar 31, 2023
1 parent 78f0feb commit b384bdb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
13 changes: 7 additions & 6 deletions .github/check-version.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ function CleanInput
################################################################################################################################

$Output = @{
RELEASE_VERSION = ''
CURRENT_TAG = ''
REMOTE_TAG_INFO = ''
RELEASE_TYPE = ''
RELEASE_VERSION = $ReleaseVersion
CURRENT_TAG = $FirmwareVersion
REMOTE_TAG_INFO = $FirmwareVersion
RELEASE_TYPE = 0
}

$Release = @(`
Expand Down Expand Up @@ -75,9 +75,10 @@ elseif ($FirmwareVersionNumber -lt $StoredFirmwareVersionNumber)
exit 1
}

$LastPublished = (gh api -H "Accept: application/vnd.github+json" `
$PublishDates = (gh api -H "Accept: application/vnd.github+json" `
-H "X-GitHub-Api-Version: 2022-11-28" "/repos/$( $RepoSelf )/releases?per_page=1" `
| ConvertFrom-Json).published_at
| ConvertFrom-Json | Select-Object published_at, created_at)
$LastPublished = ($null -eq $PublishDates.published_at ? $PublishDates.created_at : $PublishDates.published_at)
$Delta = ([DateTime]::Now - $LastPublished)

$Release = (gh api -H "Accept: application/vnd.github+json" `
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-with-firmwware.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
required: false
type: string
release:
types: [unpublished]
types: [created]
push:
paths:
- .github/workflows/build-with-firmware.yml
Expand Down

0 comments on commit b384bdb

Please sign in to comment.