Skip to content

Commit

Permalink
github: compilation.yml - Un-hardcode openomf version
Browse files Browse the repository at this point in the history
  • Loading branch information
mrannanj committed Jun 29, 2024
1 parent dd95d68 commit 2db42d8
Showing 1 changed file with 18 additions and 15 deletions.
33 changes: 18 additions & 15 deletions .github/workflows/compilation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ on:
repository_dispatch:
types: [run_build]

env:
OPENOMF_VERSION: 0.6.6

jobs:

# Check code formatting correctness
Expand Down Expand Up @@ -91,30 +94,30 @@ 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
with:
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'

- 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.
# -----------------------------------------------------------------------------------------------
Expand Down Expand Up @@ -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]
Expand Down Expand Up @@ -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.
# -----------------------------------------------------------------------------------------------
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 2db42d8

Please sign in to comment.