diff --git a/.github/workflows/compilation.yml b/.github/workflows/compilation.yml index e1b9828e1..33a2c99c9 100644 --- a/.github/workflows/compilation.yml +++ b/.github/workflows/compilation.yml @@ -9,6 +9,9 @@ on: repository_dispatch: types: [run_build] +env: + OPENOMF_VERSION: 0.6.6 + jobs: # Check code formatting correctness @@ -91,13 +94,13 @@ jobs: run: echo "sha8=`echo ${GITHUB_SHA} | cut -c1-8`" >> $GITHUB_OUTPUT - name: Generate TGZ package - run: tar cvfz ${GITHUB_WORKSPACE}/openomf_0.6.6-${{ steps.slug.outputs.sha8 }}_linux_amd64.tar.gz -C build-release/release/ . + run: tar cvfz ${GITHUB_WORKSPACE}/openomf_${OPENOMF_VERSION}-${{ steps.slug.outputs.sha8 }}_linux_amd64.tar.gz -C build-release/release/ . - name: Upload TGZ artifact uses: actions/upload-artifact@v4 with: - name: openomf_0.6.6-${{ steps.slug.outputs.sha8 }}_linux_amd64 - path: openomf_0.6.6-${{ steps.slug.outputs.sha8 }}_linux_amd64.tar.gz + name: openomf_${OPENOMF_VERSION}-${{ steps.slug.outputs.sha8 }}_linux_amd64 + path: openomf_${OPENOMF_VERSION}-${{ steps.slug.outputs.sha8 }}_linux_amd64.tar.gz - name: Generate DEB package uses: jiro4989/build-deb-action@v2 @@ -105,7 +108,7 @@ jobs: package: openomf package_root: build-release/release maintainer: ${{ github.repository_owner }} - version: 0.6.6-${{ steps.slug.outputs.sha8 }} + version: ${{OPENOMF_VERSION}}-${{ steps.slug.outputs.sha8 }} arch: 'amd64' depends: 'libargtable2, libsdl2-mixer, libconfuse, libenet, libsdl2, libxmp, libpng' desc: 'One Must Fall 2097 Remake' @@ -113,8 +116,8 @@ jobs: - name: Upload DEB artifact uses: actions/upload-artifact@v4 with: - name: openomf_0.6.6-${{ steps.slug.outputs.sha8 }}_deb_amd64 - path: openomf_0.6.6-${{ steps.slug.outputs.sha8 }}_amd64.deb + name: openomf_${OPENOMF_VERSION}-${{ steps.slug.outputs.sha8 }}_deb_amd64 + path: openomf_${OPENOMF_VERSION}-${{ steps.slug.outputs.sha8 }}_amd64.deb # Build macos package, release artifact and update "latest" release if necessary. # ----------------------------------------------------------------------------------------------- @@ -146,13 +149,13 @@ jobs: - name: Generate ZIP package run: | cd build-release/release - zip -r ${GITHUB_WORKSPACE}/openomf_0.6.6-${{ steps.slug.outputs.sha8 }}_macos12.zip . + zip -r ${GITHUB_WORKSPACE}/openomf_${OPENOMF_VERSION}-${{ steps.slug.outputs.sha8 }}_macos12.zip . - name: Upload artifacts uses: actions/upload-artifact@v4 with: - name: openomf_0.6.6-${{ steps.slug.outputs.sha8 }}_macos12 - path: openomf_0.6.6-${{ steps.slug.outputs.sha8 }}_macos12.zip + name: openomf_${OPENOMF_VERSION}-${{ steps.slug.outputs.sha8 }}_macos12 + path: openomf_${OPENOMF_VERSION}-${{ steps.slug.outputs.sha8 }}_macos12.zip build_macos-arm: needs: [unittest, formatting-check] @@ -182,13 +185,13 @@ jobs: - name: Generate ZIP package run: | cd build-release/release - zip -r ${GITHUB_WORKSPACE}/openomf_0.6.6-${{ steps.slug.outputs.sha8 }}_macos14_arm.zip . + zip -r ${GITHUB_WORKSPACE}/openomf_${OPENOMF_VERSION}-${{ steps.slug.outputs.sha8 }}_macos14_arm.zip . - name: Upload artifacts uses: actions/upload-artifact@v4 with: - name: openomf_0.6.6-${{ steps.slug.outputs.sha8 }}_macos14_arm - path: openomf_0.6.6-${{ steps.slug.outputs.sha8 }}_macos14_arm.zip + name: openomf_${OPENOMF_VERSION}-${{ steps.slug.outputs.sha8 }}_macos14_arm + path: openomf_${OPENOMF_VERSION}-${{ steps.slug.outputs.sha8 }}_macos14_arm.zip # Build windows package, release artifact and update "latest" release if necessary. # ----------------------------------------------------------------------------------------------- @@ -230,13 +233,13 @@ jobs: - name: Generate ZIP package run: | cd build-release/release - zip -r ${GITHUB_WORKSPACE}/openomf_0.6.6-${{ steps.slug.outputs.sha8 }}_windows_amd64.zip openomf + zip -r ${GITHUB_WORKSPACE}/openomf_${OPENOMF_VERSION}-${{ steps.slug.outputs.sha8 }}_windows_amd64.zip openomf - name: Upload artifacts uses: actions/upload-artifact@v4 with: - name: openomf_0.6.6-${{ steps.slug.outputs.sha8 }}_windows_amd64 - path: openomf_0.6.6-${{ steps.slug.outputs.sha8 }}_windows_amd64.zip + name: openomf_${OPENOMF_VERSION}-${{ steps.slug.outputs.sha8 }}_windows_amd64 + path: openomf_${OPENOMF_VERSION}-${{ steps.slug.outputs.sha8 }}_windows_amd64.zip # Create a "latest" release