소스 검색

Update build.yaml

CaCO3 1 년 전
부모
커밋
37ba85717f
1개의 변경된 파일7개의 추가작업 그리고 9개의 파일을 삭제
  1. 7 9
      .github/workflows/build.yaml

+ 7 - 9
.github/workflows/build.yaml

@@ -272,6 +272,9 @@ jobs:
 ## Prepare and create release
 ## Prepare and create release
 #########################################################################################
 #########################################################################################
   prepare-release: 
   prepare-release: 
+    on:
+      release:
+        types: [released]
     runs-on: ubuntu-latest
     runs-on: ubuntu-latest
     needs: [pack-for-update, pack-for-manual_setup, pack-for-remote_setup]
     needs: [pack-for-update, pack-for-manual_setup, pack-for-remote_setup]
     if: startsWith(github.ref, 'refs/tags/') 
     if: startsWith(github.ref, 'refs/tags/') 
@@ -331,13 +334,11 @@ jobs:
 
 
     # extract the version used in next step
     # extract the version used in next step
     - id: get_version
     - id: get_version
-      if: startsWith(github.ref, 'refs/tags/') 
-      uses: Simply007/get-version-action@v2
+      uses: dhkatz/get-version-action@v2
 
 
 #    # the changelog [unreleased] will now be changed to the release version
 #    # the changelog [unreleased] will now be changed to the release version
 #    - name: Update changelog
 #    - name: Update changelog
 #      uses: thomaseizinger/keep-a-changelog-new-release@v1
 #      uses: thomaseizinger/keep-a-changelog-new-release@v1
-#      if: startsWith(github.ref, 'refs/tags/') 
 #      with:
 #      with:
 #        changelogPath: Changelog.md
 #        changelogPath: Changelog.md
 #        version: ${{ steps.get_version.outputs.version-without-v }}
 #        version: ${{ steps.get_version.outputs.version-without-v }}
@@ -345,7 +346,6 @@ jobs:
 #    # the release notes will be extracted from changelog 
 #    # the release notes will be extracted from changelog 
 #    - name: Extract release notes
 #    - name: Extract release notes
 #      id: extract-release-notes
 #      id: extract-release-notes
-#      if: startsWith(github.ref, 'refs/tags/') 
 #      uses: ffurrer2/extract-release-notes@v1
 #      uses: ffurrer2/extract-release-notes@v1
 #      with:
 #      with:
 #          changelog_file: Changelog.md
 #          changelog_file: Changelog.md
@@ -353,12 +353,11 @@ jobs:
     # Releases should only be created on master by tagging the last commit.
     # Releases should only be created on master by tagging the last commit.
     # all artifacts in firmware folder pushed to the release
     # all artifacts in firmware folder pushed to the release
     - name: Release
     - name: Release
-      uses: softprops/action-gh-release@v1
+      uses: softprops/action-gh-release@v2.0.8
       # Note:
       # Note:
       # If you get the error "Resource not accessible by integration",
       # If you get the error "Resource not accessible by integration",
       # The access rights are not sufficient, see
       # The access rights are not sufficient, see
       # https://github.com/softprops/action-gh-release/issues/232#issuecomment-1131379440
       # https://github.com/softprops/action-gh-release/issues/232#issuecomment-1131379440
-      if: startsWith(github.ref, 'refs/tags/')
       with:
       with:
         name:  ${{ steps.get_version.outputs.version-without-v }}
         name:  ${{ steps.get_version.outputs.version-without-v }}
         body: ${{ steps.extract-release-notes.outputs.release_notes }}
         body: ${{ steps.extract-release-notes.outputs.release_notes }}
@@ -367,7 +366,6 @@ jobs:
 
 
 #    # Commit&Push Changelog to master branch. Must be manually merged back to rolling
 #    # Commit&Push Changelog to master branch. Must be manually merged back to rolling
 #    - name: Commit changes and push changes
 #    - name: Commit changes and push changes
-#      if: startsWith(github.ref, 'refs/tags/') 
 #      run: |
 #      run: |
 #        git config user.name github-actions
 #        git config user.name github-actions
 #        git config user.email github-actions@github.com
 #        git config user.email github-actions@github.com
@@ -381,7 +379,7 @@ jobs:
 #########################################################################################
 #########################################################################################
 # Make sure to also update update-webinstaller.yml!
 # Make sure to also update update-webinstaller.yml!
   update-web-installer:
   update-web-installer:
-    if: startsWith(github.ref, 'refs/tags/v') # Only run on a release
+    if: "!github.event.release.prerelease" # Only run on release but not on prerelease
     needs: [prepare-release]
     needs: [prepare-release]
     environment:
     environment:
       name: github-pages
       name: github-pages
@@ -400,7 +398,7 @@ jobs:
 
 
     - name: Get version of last release
     - name: Get version of last release
       id: last_release
       id: last_release
-      uses: mindojo/get-latest-release@0b8ef1434d7468d6bffcc8263baff5c777f72321
+      uses: mindojo/get-latest-release@00b8ef1434d7468d6bffcc8263baff5c777f72321
       with:
       with:
         myToken: ${{ github.token }}
         myToken: ${{ github.token }}
         exclude_types: "draft|prerelease"
         exclude_types: "draft|prerelease"