Skip to content

Version 2.11.1

Version 2.11.1 #287

Workflow file for this run

name: publish
on:
push:
branches:
- dev
- release/*
paths:
- CHANGELOG.md
workflow_dispatch:
# Inputs the workflow accepts.
inputs:
version:
# actions run ID
description: 'Please input release version, example: 2.1.0'
# Default value if no value is explicitly provided
default: 'auto'
# Input has to be provided for the workflow to run
required: false
commitish:
description: 'Please input commitis value that determines where the Git tag is created from. Can be any branch or commit SHA. Defaults to workflow branch.'
default: ''
required: false
jobs:
publish:
runs-on: windows-latest
steps:
- uses: actions/checkout@v6
- name: Check release version
id: check_ver
shell: pwsh
run: |
# commit message template: Version 1.8.0
$commit_msg = "$(git show -s --format=%s)"
echo "Parsing release version from commit message: $commit_msg"
$matchInfo = [Regex]::Match($commit_msg, '^Version\s+(?<ver>\d+\.\d+\.\d+)$')
if(!$matchInfo.Success) { $matchInfo = [Regex]::Match('${{github.event.inputs.version}}', '^(?<ver>\d+\.\d+\.\d+(-\w+)?)$') }
if($matchInfo.Success) { $release_ver = $matchInfo.Groups['ver'].Value } else { $release_ver='' }
echo "release_ver=$release_ver"
echo "release_ver=$release_ver" >> ${env:GITHUB_OUTPUT}
- name: Make package
if: ${{ steps.check_ver.outputs.release_ver != '' }}
id: make_pkg
# Some projects don't allow in-source building, so create a separate build directory
# We'll use this as our working directory for all subsequent commands
shell: pwsh
run: |
$AX_ROOT = $(pwd).Path
./setup.ps1
./1k/fetch.ps1 -uri 'oboe' -prefix $(Join-Path $AX_ROOT 'cache') -manifest $(Join-Path $AX_ROOT 'manifest.json')
axmol -xc '-DAX_WITH_LZ4=ON,-DAX_WITH_CARES=ON,-DAX_WITH_YAML_CPP=ON,-DAX_WITH_KCP=ON' -c
$input_commitish = "${{ github.event.inputs.commitish }}"
if (!$input_commitish) { $input_commitish = $(git -C $AX_ROOT branch --show-current) }
./tools/ci/publish.ps1 -version "${{ steps.check_ver.outputs.release_ver }}" -commitish $input_commitish
echo "commitish=$input_commitish" >> ${env:GITHUB_OUTPUT}
- name: Publish to github release page
if: ${{ steps.make_pkg.outputs.release_tag != '' }}
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ steps.make_pkg.outputs.release_tag }}
name: ${{ steps.make_pkg.outputs.release_tag }}
files: ${{ steps.make_pkg.outputs.release_pkg }}
body_path: ${{ steps.make_pkg.outputs.release_note }}
prerelease: ${{ steps.make_pkg.outputs.prerelease }}
target_commitish: ${{ steps.make_pkg.outputs.commitish }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}