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 51a0c5f commit 5acd582
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,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_${{ env.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_${{ env.OPENOMF_VERSION }}-${{ steps.slug.outputs.sha8 }}_linux_amd64
path: openomf_${{ env.OPENOMF_VERSION }}-${{ steps.slug.outputs.sha8 }}_linux_amd64.tar.gz
if-no-files-found: error

- name: Generate DEB package
Expand All @@ -106,16 +109,16 @@ jobs:
package: openomf
package_root: build-release/release
maintainer: ${{ github.repository_owner }}
version: 0.6.6-${{ steps.slug.outputs.sha8 }}
version: ${{ env.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_${{ env.OPENOMF_VERSION }}-${{ steps.slug.outputs.sha8 }}_deb_amd64
path: openomf_${{ env.OPENOMF_VERSION }}-${{ steps.slug.outputs.sha8 }}_amd64.deb
if-no-files-found: error

# Build macos package, release artifact and update "latest" release if necessary.
Expand Down Expand Up @@ -148,13 +151,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_${{ env.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_${{ env.OPENOMF_VERSION }}-${{ steps.slug.outputs.sha8 }}_macos12
path: openomf_${{ env.OPENOMF_VERSION }}-${{ steps.slug.outputs.sha8 }}_macos12.zip
if-no-files-found: error

build_macos-arm:
Expand Down Expand Up @@ -185,13 +188,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_${{ env.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_${{ env.OPENOMF_VERSION }}-${{ steps.slug.outputs.sha8 }}_macos14_arm
path: openomf_${{ env.OPENOMF_VERSION }}-${{ steps.slug.outputs.sha8 }}_macos14_arm.zip
if-no-files-found: error

# Build windows package, release artifact and update "latest" release if necessary.
Expand Down Expand Up @@ -234,13 +237,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_${{ env.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_${{ env.OPENOMF_VERSION }}-${{ steps.slug.outputs.sha8 }}_windows_amd64
path: openomf_${{ env.OPENOMF_VERSION }}-${{ steps.slug.outputs.sha8 }}_windows_amd64.zip
if-no-files-found: error


Expand Down

0 comments on commit 5acd582

Please sign in to comment.