auto-semver intergration

if if

Container

Build via matrix

Update version & build

Fix

Fix

Fix

Fix

Update
This commit is contained in:
Layla 2019-12-20 20:30:29 -05:00
parent d414e77141
commit 0e4cbcd31d
4 changed files with 110 additions and 73 deletions

15
.bumpversion.cfg Normal file
View File

@ -0,0 +1,15 @@
[bumpversion]
current_version = 0.0.0
commit = False
tag = True
tag_name = {new_version}
[bumpversion:file:Nodes/Title.tscn]
search = text = "develop"
replace = text = "{new_version}"
[semver]
main_branches = develop
major_branches =
minor_branches = feature
patch_branches = hotfix, bugfix

View File

@ -1,67 +1,73 @@
name: Build & Push name: Build & Publish
on: [push, pull_request] on: release
jobs: jobs:
Build: Build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy:
matrix:
platform: [linux, windows, mac]
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v1 uses: actions/checkout@v1
- name: Build Multi-Platform Project - name: ''
uses: josephbmanley/build-godot-action@v1.2.1 run: |
env: pip install bumpversion
PROJECT: GITS export regex=v([0-9]+.[0-9]+.[0-9]+)
SUBDIRECTORY: GITS echo ${{ github.ref }} > tag.txt
- name: Ship to S3 VERSION=`grep -Po '${regex}' tag.txt`
uses: jakejarvis/s3-sync-action@master bumpversion --new-version ${VERSION}
- name: Build
id: build
uses: josephbmanley/build-godot-action@refactor/build
with: with:
args: --follow-symlinks --delete name: glitchinthesystem
preset: ${{ matrix.platform }}
subdirectory: gits
- name: GitHub Release Artifact
uses: josephbmanley/upload-to-release@feature/remoteName
with:
args: ${{ steps.build.outputs.artifact }} application/zip ${{ matrix.platform }}.zip
env: env:
SOURCE_DIR: build GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
AWS_REGION: us-east-1 - name: Butler Publish
DEST_DIR: glitch/builds/${{ github.ref }}
AWS_S3_BUCKET: sumu-games-pkg-us-east-1
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
- name: Butler Publish Linux
uses: josephbmanley/butler-publish-itchio-action@v1.0.0 uses: josephbmanley/butler-publish-itchio-action@v1.0.0
if: github['ref'] == 'refs/heads/develop'
env: env:
BUTLER_CREDENTIALS: ${{ secrets.BUTLER_CREDENTIALS }} BUTLER_CREDENTIALS: ${{ secrets.BUTLER_CREDENTIALS }}
VERSION: develop VERSION: develop
ITCH_USER: joebmanley ITCH_USER: joebmanley
ITCH_GAME: glitchinthesystem ITCH_GAME: glitchinthesystem
CHANNEL: linux CHANNEL: ${{ matrix.platform }}
PACKAGE: build/linux PACKAGE: ${{ steps.build.outputs.artifact }}
- name: Butler Publish Windows HTML:
uses: josephbmanley/butler-publish-itchio-action@v1.0.0 runs-on: ubuntu-latest
if: github['ref'] == 'refs/heads/develop' steps:
- name: Checkout
uses: actions/checkout@v1
- name: ''
run: |
pip install bumpversion
bumpversion --new-version ${SEMVER_NEW_VERSION}
- name: Build
id: build
uses: josephbmanley/build-godot-action@refactor/build
with:
name: glitchinthesystem
preset: html5
- name: GitHub Release Artifact
uses: josephbmanley/upload-to-release@feature/remoteName
with:
args: ${{ steps.build.outputs.artifact }} application/zip html5.zip
env: env:
BUTLER_CREDENTIALS: ${{ secrets.BUTLER_CREDENTIALS }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VERSION: develop - name: Butler Publish
ITCH_USER: joebmanley
ITCH_GAME: glitchinthesystem
CHANNEL: windows
PACKAGE: build/windows
- name: Butler Publish HTML5
uses: josephbmanley/butler-publish-itchio-action@v1.0.0 uses: josephbmanley/butler-publish-itchio-action@v1.0.0
if: github['ref'] == 'refs/heads/develop'
env: env:
BUTLER_CREDENTIALS: ${{ secrets.BUTLER_CREDENTIALS }} BUTLER_CREDENTIALS: ${{ secrets.BUTLER_CREDENTIALS }}
VERSION: develop VERSION: develop
ITCH_USER: joebmanley ITCH_USER: joebmanley
ITCH_GAME: glitchinthesystem ITCH_GAME: glitchinthesystem
CHANNEL: html5 CHANNEL: html5
PACKAGE: build/html5/GITS PACKAGE: ${{ steps.build.outputs.artifact }}
- name: Butler Publish OSX
uses: josephbmanley/butler-publish-itchio-action@v1.0.0
if: github['ref'] == 'refs/heads/develop'
env:
BUTLER_CREDENTIALS: ${{ secrets.BUTLER_CREDENTIALS }}
VERSION: develop
ITCH_USER: joebmanley
ITCH_GAME: glitchinthesystem
CHANNEL: osx
PACKAGE: build/mac

41
.github/workflows/version.yml vendored Normal file
View File

@ -0,0 +1,41 @@
name: Version & Release
on:
push:
branches:
- develop
jobs:
CheckVersion:
runs-on: ubuntu-latest
container:
image: rightbrainnetworks/auto-semver
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Run auto-semver
id: semver
run: |
export regex='^\\s*current_version\\s*=\\s*\\K[^\\s]+'
export RETURN_STATUS=`semver -n`
echo "Semver Return Status: ${RETURN_STATUS}"
export SEMVER_NEW_VERSION=`grep -Po '${regex}' .bumpversion.cfg`
export VERSION=`semver_get_version -d`
echo ::set-output name=RETURN_STATUS::$RETURN_STATUS
echo ::set-output name=SEMVER_NEW_VERSION::$SEMVER_NEW_VERSION
echo ::set-output name=VERSION::$VERSION
- name: Create Release
id: create_release
uses: actions/create-release@v1
if: steps['semver']['outputs']['RETURN_STATUS'] == '0'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ steps.semver.outputs.SEMVER_NEW_VERSION }}
release_name: v${{ steps.semver.outputs.SEMVER_NEW_VERSION }}
body: |
Glitch In The System v${{ steps.semver.outputs.SEMVER_NEW_VERSION }}
draft: false
prerelease: false

View File

@ -1,6 +1,6 @@
[preset.0] [preset.0]
name="HTML5" name="html5"
platform="HTML5" platform="HTML5"
runnable=true runnable=true
custom_features="" custom_features=""
@ -23,7 +23,7 @@ custom_template/debug=""
[preset.1] [preset.1]
name="Mac OSX" name="osx"
platform="Mac OSX" platform="Mac OSX"
runnable=true runnable=true
custom_features="" custom_features=""
@ -54,7 +54,7 @@ texture_format/etc2=false
[preset.2] [preset.2]
name="Windows Desktop" name="windows"
platform="Windows Desktop" platform="Windows Desktop"
runnable=true runnable=true
custom_features="" custom_features=""
@ -87,14 +87,14 @@ application/trademarks=""
[preset.3] [preset.3]
name="Linux/X11" name="linux"
platform="Linux/X11" platform="Linux/X11"
runnable=false runnable=true
custom_features="" custom_features=""
export_filter="all_resources" export_filter="all_resources"
include_filter="" include_filter=""
exclude_filter="" exclude_filter=""
export_path="/home/hive/Projects/Personal/GlitchInTheSystem/Builds/Glitch in the System.x86_64" export_path=""
patch_list=PoolStringArray( ) patch_list=PoolStringArray( )
script_export_mode=1 script_export_mode=1
script_encryption_key="" script_encryption_key=""
@ -109,28 +109,3 @@ texture_format/no_bptc_fallbacks=true
binary_format/64_bits=true binary_format/64_bits=true
custom_template/release="" custom_template/release=""
custom_template/debug="" custom_template/debug=""
[preset.4]
name="linux"
platform="Linux/X11"
runnable=true
custom_features=""
export_filter="all_resources"
include_filter=""
exclude_filter=""
export_path=""
patch_list=PoolStringArray( )
script_export_mode=1
script_encryption_key=""
[preset.4.options]
texture_format/bptc=false
texture_format/s3tc=true
texture_format/etc=false
texture_format/etc2=false
texture_format/no_bptc_fallbacks=true
binary_format/64_bits=true
custom_template/release=""
custom_template/debug=""