eht16 left a comment (geany/geany#4238)

> what difference has this action, that happens only on tags, compared to that? 
> Certainly

It's not much different except:
- the `.git` directory is removed so that `./configure` does not detect it and 
think it's a development build
- the `-g` compiler flag is removed
- the installer name is changed to reflect a release build

We can probably merge the changes into the existing Windows job so that we 
don't have to maintain both variants which share a lot of code.
The current way was easier and I wanted to get first feedback. If you like, I 
can try to combine both jobs into one.

The full diff of the jobs:
<details><summary>Details</summary>
<p>

```diff
--- .github/workflows/build.yml 2024-10-06 13:27:12.849568795 +0200
+++ .github/workflows/release-windows.yml       2025-02-16 13:54:48.781876263 
+0100
@@ -2,177 +2,29 @@
 # Copyright:   2021, The Geany contributors
 # License:             GNU GPL v2 or later
 
-name: CI Build
+name: Release Windows
 
 on:
   push:
-    branches:
-      - master
-  pull_request:
-    branches:
-      - master
+    tags:
+      - '[0-9]+.[0-9]+.[0-9]+'
   workflow_dispatch:
 
 # cancel already running builds of the same branch or pull request
 concurrency:
-  group: ${{ github.workflow }}-${{ github.event.pull_request.number || 
github.sha }}
+  group: ${{ github.workflow }}-${{ github.sha }}
   cancel-in-progress: true
 
 env:
-  CFLAGS: -g -O2 -Werror=pointer-arith -Werror=implicit-function-declaration
-  CCACHE_DIR: ${{ github.workspace }}/.ccache
-  CCACHE_COMPRESS: true
-  CCACHE_MAXSIZE: 1G
-  PYTHON: python3
+  CFLAGS: -O2 -Werror=pointer-arith -Werror=implicit-function-declaration
   JOBS: 2
   DEBUG: 0
 
 jobs:
   mingw64:
     name: Mingw-w64 Build (Windows)
-    runs-on: ubuntu-20.04
+    runs-on: ubuntu-24.04
 
     env:
       INFRASTRUCTURE_PATH:      ${{ github.workspace }}/.infrastructure
@@ -193,19 +45,6 @@
           path: ${{ env.INFRASTRUCTURE_PATH }}
           token: ${{ github.token }}
 
-      - uses: jwalton/gh-find-current-pr@v1
-        id: find_pull_request
-        with:
-          state: open
-
-      - name: Define environment variables
-        run: |
-          echo "SHORT_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
-          echo "GITHUB_PULL_REQUEST=${GITHUB_PULL_REQUEST}" >> $GITHUB_ENV
-          echo "GITHUB_PULL_REQUEST_OR_REF=${GITHUB_PULL_REQUEST:-${{ 
github.ref_name }}}" | tr '/' '-' >> $GITHUB_ENV
-        env:
-          GITHUB_PULL_REQUEST: ${{ steps.find_pull_request.outputs.pr }}
-
       - name: Show Environment
         if: ${{ env.DEBUG == '1' }}
         run: |
@@ -237,15 +76,15 @@
           fi
 
       - name: Build Geany
-        if: steps.geany_cache.outputs.cache-hit != 'true'
         working-directory: ${{ env.BUILDER_PATH }}
         run: |
+            rm -rf ${{ github.workspace }}/.git
             bash start_build.sh --log-to-stdout --mingw64 --geany 
--geany-source "${{ github.workspace }}"
 
       - name: Archive Geany Installer
         uses: actions/upload-artifact@v4
         with:
-          name: geany-installer-ci-${{ env.SHORT_SHA }}-pr${{ 
env.GITHUB_PULL_REQUEST_OR_REF }}
+          name: geany-installer-release-${{ github.ref_name }}
           retention-days: 30
           path: |
             ${{ env.BUILDER_PATH }}/output/mingw64/geany-*.exe
```

</p>
</details> 



-- 
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/4238#issuecomment-2661422050
You are receiving this because you are subscribed to this thread.

Message ID: <geany/geany/pull/4238/[email protected]>

Reply via email to