mirror of
https://github.com/digarok/gsplus.git
synced 2024-05-28 13:41:31 +00:00
adding version to ci
This commit is contained in:
parent
d28578f725
commit
488af42cba
80
.github/workflows/release.yml
vendored
80
.github/workflows/release.yml
vendored
|
@ -44,17 +44,21 @@ jobs:
|
|||
uses: actions/download-artifact@v1
|
||||
with:
|
||||
name: data
|
||||
- name: Get Tag Name
|
||||
id: get_data
|
||||
- name: Set Release Data in Outputs
|
||||
id: release_data
|
||||
shell: bash
|
||||
run: |
|
||||
URL=`cat data/release_url.txt | tr -d '"'`
|
||||
VERSION=`cat src/version.txt`
|
||||
echo ::set-output name=SOURCE_TAG::${GITHUB_REF#refs/tags/}
|
||||
echo ::set-output name=RELEASE_URL::$URL
|
||||
echo "URL = $URL"
|
||||
echo name=SOURCE_TAG::${GITHUB_REF#refs/tags/}
|
||||
echo ::set-output name=URL::$URL
|
||||
echo ::set-output name=VERSION::$VERSION
|
||||
echo "SOURCE_TAG::${GITHUB_REF#refs/tags/}"
|
||||
echo "URL::$URL"
|
||||
echo "VERSION::$VERSION"
|
||||
- uses: actions/checkout@v1
|
||||
- uses: ilammy/msvc-dev-cmd@v1
|
||||
|
||||
- name: Prep MacOSX
|
||||
if: matrix.os == 'macos-latest'
|
||||
shell: bash
|
||||
|
@ -81,6 +85,7 @@ jobs:
|
|||
brew install -f sdl2_image-2.0.5.mojave.bottle.tar.gz
|
||||
curl -L https://bintray.com/homebrew/bottles/download_file?file_path=freetype-2.10.1.mojave.bottle.tar.gz -o freetype-2.10.1.mojave.bottle.tar.gz
|
||||
brew install -f freetype-2.10.1.mojave.bottle.tar.gz
|
||||
|
||||
- name: Prep Ubuntu
|
||||
if: matrix.os == 'ubuntu-latest'
|
||||
shell: bash
|
||||
|
@ -91,34 +96,50 @@ jobs:
|
|||
|
||||
- name: Build MacOS/Ubuntu
|
||||
if: matrix.os != 'windows-latest'
|
||||
#working-directory: ./
|
||||
shell: bash
|
||||
run: |
|
||||
echo "${{ matrix.os }} BUILD"
|
||||
mkdir build ; cd build
|
||||
cmake ..
|
||||
make
|
||||
pwd ; ls -al
|
||||
shell: bash
|
||||
|
||||
# - name: Package NonWindows
|
||||
# if: matrix.os != 'windows-latest'
|
||||
# run: |
|
||||
# zip --junk-paths merlin32.zip Source/merlin32 README.md
|
||||
|
||||
- name: Package MacOS
|
||||
if: matrix.os == 'macos-latest'
|
||||
run: cd build ; chmod +x ../scripts/package-osx.sh ; ../scripts/package-osx.sh
|
||||
run: cd build ; sh ../scripts/package-osx.sh
|
||||
|
||||
- name: Package Ubuntu
|
||||
if: matrix.os == 'ubuntu-latest'
|
||||
env:
|
||||
PACKAGE_NAME: gsplus-ubuntu
|
||||
run: |
|
||||
PACKAGE_DIR=gsplus-ubuntu-sdl
|
||||
mkdir $PACKAGE_DIR
|
||||
mkdir $PACKAGE_DIR/doc
|
||||
cp build/src/GSplus $PACKAGE_DIR/gsplus
|
||||
cp build/src/to_pro $PACKAGE_DIR/to_pro
|
||||
cp src/assets/config.txt $PACKAGE_DIR
|
||||
cp LICENSE.txt $PACKAGE_DIR/doc/
|
||||
cp doc/gsplusmanual.pdf $PACKAGE_DIR/doc/
|
||||
cp doc/README.txt $PACKAGE_DIR/doc/
|
||||
tar -cvjf gsplus-ubuntu-sdl.tar.bz2 $PACKAGE_DIR
|
||||
mkdir -p $PACKAGE_NAME
|
||||
mkdir -p $PACKAGE_NAME/doc
|
||||
cp build/src/GSplus $PACKAGE_NAME/gsplus
|
||||
cp build/src/to_pro $PACKAGE_NAME/to_pro
|
||||
cp src/assets/config.txt $PACKAGE_NAME
|
||||
cp LICENSE.txt $PACKAGE_NAME/doc/
|
||||
cp doc/gsplusmanual.pdf $PACKAGE_NAME/doc/
|
||||
cp doc/README.txt $PACKAGE_NAME/doc/
|
||||
tar -cvjf $PACKAGE_NAME.tar.bz2 $PACKAGE_NAME
|
||||
|
||||
- name: Package .deb
|
||||
if: matrix.os == 'ubuntu-latest'
|
||||
env:
|
||||
PACKAGE_NAME: gsplus_${{ steps.release_data.outputs.VERSION }}-0
|
||||
run: |
|
||||
#PACKAGE_NAME: gsplus_$VERSION-0
|
||||
mkdir -p $PACKAGE_NAME/usr/local/bin
|
||||
mkdir -p $PACKAGE_NAME/DEBIAN
|
||||
cp gsplus.bin $PACKAGE_NAME/usr/local/bin/gsplus
|
||||
cp assets/control $PACKAGE_NAME/DEBIAN
|
||||
dpkg-deb --build $PACKAGE_NAME
|
||||
|
||||
- name: Upload Release Asset MacOSX
|
||||
if: matrix.os == 'macos-latest'
|
||||
#id: upload-release-asset
|
||||
|
@ -126,18 +147,29 @@ jobs:
|
|||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.get_data.outputs.RELEASE_URL }}
|
||||
upload_url: ${{ steps.release_data.outputs.URL }}
|
||||
asset_path: ./build/GSplus-Install.dmg
|
||||
asset_name: ${{ format('GSplus-Install-{0}-{1}.dmg', matrix.os, steps.get_data.outputs.SOURCE_TAG ) }}
|
||||
asset_name: ${{ format('GSplus-Install-{0}-{1}.dmg', matrix.os, steps.release_data.outputs.SOURCE_TAG ) }}
|
||||
asset_content_type: application/x-apple-diskimage
|
||||
|
||||
- name: Upload Release Asset Ubuntu
|
||||
if: matrix.os == 'ubuntu-latest'
|
||||
#id: upload-release-asset
|
||||
uses: actions/upload-release-asset@v1.0.1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.get_data.outputs.RELEASE_URL }}
|
||||
asset_path: ./gsplus-ubuntu-sdl.tar.bz2
|
||||
asset_name: ${{ format('gsplus-ubuntu-sdl2-{0}.tar.bz2', steps.get_data.outputs.SOURCE_TAG ) }}
|
||||
upload_url: ${{ steps.release_data.outputs.URL }}
|
||||
asset_path: ./gsplus-ubuntu.tar.bz2
|
||||
asset_name: ${{ format('gsplus-ubuntu-{0}.tar.bz2', steps.release_data.outputs.VERSION ) }}
|
||||
asset_content_type: application/x-bzip2
|
||||
|
||||
- name: Upload Release Asset .deb
|
||||
if: matrix.os == 'ubuntu-latest'
|
||||
uses: actions/upload-release-asset@v1.0.1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.release_data.outputs.URL }}
|
||||
asset_path: ${{ format('./gsplus_{0}-0.deb', steps.release_data.outputs.VERSION ) }}
|
||||
asset_name: ${{ format('gsplus_{0}-0.deb', steps.release_data.outputs.VERSION ) }}
|
||||
asset_content_type: application/vnd.debian.binary-package
|
||||
|
|
|
@ -81,6 +81,7 @@ check_function_exists(strcasestr HAVE_STRCASESTR)
|
|||
|
||||
configure_file(string_extra.h.in string_extra.h)
|
||||
configure_file(version.h.in version.h)
|
||||
configure_file(version.txt.in version.txt)
|
||||
|
||||
set(generated_headers 8inst_c.h 16inst_c.h 8inst_s.h 16inst_s.h size_c.h size_s.h 8size_s.h 16size_s.h)
|
||||
add_custom_command(
|
||||
|
|
1
src/version.txt.in
Normal file
1
src/version.txt.in
Normal file
|
@ -0,0 +1 @@
|
|||
@gsplus_VERSION_MAJOR@.@gsplus_VERSION_MINOR@
|
Loading…
Reference in New Issue
Block a user