Browse Source

Minor update in GH Actions workflows

DarthSim 8 months ago
parent
commit
2df12ddf0c
2 changed files with 6 additions and 5 deletions
  1. 2 2
      .github/workflows/ci.yml
  2. 4 3
      .github/workflows/release.yml

+ 2 - 2
.github/workflows/ci.yml

@@ -18,7 +18,7 @@ jobs:
     steps:
       - name: Checkout
         uses: actions/checkout@v4
-      - uses: actions/setup-go@v4
+      - uses: actions/setup-go@v5
         with:
           go-version: ${{ matrix.go-version }}
       - name: Download mods
@@ -40,7 +40,7 @@ jobs:
     steps:
       - name: Checkout
         uses: actions/checkout@v4
-      - uses: actions/setup-go@v4
+      - uses: actions/setup-go@v5
         with:
           go-version: ${{ matrix.go-version }}
       - name: Download mods

+ 4 - 3
.github/workflows/release.yml

@@ -28,6 +28,7 @@ jobs:
         uses: actions/checkout@v2
 
       - name: Prepare notes
+        id: notes
         run: |
           # Extract changelog entries between this and previous version headers
           escaped_version=$(echo ${GITHUB_REF_NAME#v} | sed -e 's/[]\/$*.^[]/\\&/g')
@@ -36,13 +37,13 @@ jobs:
 
           # Write PRERELEASE="true" env if tag name has any suffix after vMAJOR.MINOR.PATCH
           if [[ ${GITHUB_REF_NAME} =~ ^v[0-9]+\.[0-9]+\.[0-9]+.+ ]]; then
-            echo 'PRERELEASE="true"' >> $GITHUB_ENV
+            echo "prerelease=true" >> "$GITHUB_OUTPUT"
           else
-            echo 'PRERELEASE="false"' >> $GITHUB_ENV
+            echo "prerelease=false" >> "$GITHUB_OUTPUT"
           fi
 
       - name: Release
         uses: softprops/action-gh-release@v1
         with:
           body_path: RELEASE_NOTES.txt
-          prerelease: ${{ fromJSON(env.PRERELEASE) }}
+          prerelease: ${{ fromJSON(steps.notes.outputs.prerelease) }}