Просмотр исходного кода

Merge pull request #16 from derskythe/feat/ci

Feat/ci
Der Skythe 2 лет назад
Родитель
Сommit
a585c6bc45

+ 7 - 7
.github/actions/make-release/action.yml

@@ -29,13 +29,13 @@ inputs:
     description: 'remote_tag_info'
     description: 'remote_tag_info'
     required: true
     required: true
 
 
-outputs:
-  make-minor-release:
-    description: "make-minor-release"
-    value: ${{ steps.make-minor-release.outputs }}
-  make-major-release:
-    description: "make-minor-release"
-    value: ${{ steps.make-major-release.outputs }}
+# outputs:
+#   make-minor-release:
+#     description: "make-minor-release"
+#     value: ${{ steps.make-minor-release.outputs }}
+#   make-major-release:
+#     description: "make-minor-release"
+#     value: ${{ steps.make-major-release.outputs }}
 
 
 runs:
 runs:
   using: "composite"
   using: "composite"

+ 7 - 6
.github/check-version.ps1

@@ -22,10 +22,10 @@ function CleanInput
 ################################################################################################################################
 ################################################################################################################################
 
 
 $Output = @{
 $Output = @{
-    RELEASE_VERSION = ''
-    CURRENT_TAG = ''
-    REMOTE_TAG_INFO = ''
-    RELEASE_TYPE = ''
+    RELEASE_VERSION = $ReleaseVersion
+    CURRENT_TAG     = $FirmwareVersion
+    REMOTE_TAG_INFO = $FirmwareVersion
+    RELEASE_TYPE = 0
 }
 }
 
 
 $Release = @(`
 $Release = @(`
@@ -75,9 +75,10 @@ elseif ($FirmwareVersionNumber -lt $StoredFirmwareVersionNumber)
     exit 1
     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" `
         -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)
 $Delta = ([DateTime]::Now - $LastPublished)
 
 
 $Release = (gh api -H "Accept: application/vnd.github+json" `
 $Release = (gh api -H "Accept: application/vnd.github+json" `

+ 2 - 1
.github/workflows/build-with-firmwware.yml

@@ -9,7 +9,7 @@ on:
         required: false
         required: false
         type: string
         type: string
   release:
   release:
-    types: [unpublished]
+    types: [created]
   push:
   push:
     paths:
     paths:
       - .github/workflows/build-with-firmware.yml
       - .github/workflows/build-with-firmware.yml
@@ -30,6 +30,7 @@ jobs:
       IGNORED_PATH: "applications_user/subbrute"
       IGNORED_PATH: "applications_user/subbrute"
       RELATIVE_PATH: "applications/external/subbrute"
       RELATIVE_PATH: "applications/external/subbrute"
       CURRENT_VERSION: ${{ vars.RELEASE_VERSION }}
       CURRENT_VERSION: ${{ vars.RELEASE_VERSION }}
+      RELEASE_VERSION: ${{ vars.RELEASE_VERSION }}
     strategy:
     strategy:
       fail-fast: false
       fail-fast: false
       matrix:
       matrix: