actions: embed lua into yaml
This commit is contained in:
27
.github/workflows/test.yml
vendored
27
.github/workflows/test.yml
vendored
@@ -9,23 +9,28 @@ jobs:
|
||||
get-info:
|
||||
runs-on: ubuntu-20.04
|
||||
outputs:
|
||||
name: ${{ steps.actual-get-info.outputs.name }}
|
||||
apkCode: ${{ steps.actual-get-info.outputs.apkCode }}
|
||||
code: ${{ steps.actual-get-info.outputs.code }}
|
||||
release: ${{ steps.actual-get-info.outputs.release }}
|
||||
commit: ${{ steps.actual-get-info.outputs.commit }}
|
||||
name: ${{ steps.lua-related.outputs.name }}
|
||||
apkCode: ${{ steps.lua-related.outputs.apkCode }}
|
||||
code: ${{ steps.lua-related.outputs.code }}
|
||||
release: ${{ steps.lua-related.outputs.release }}
|
||||
commit: ${{ steps.git-related.outputs.commit }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Install lua
|
||||
run: |
|
||||
sudo apt-get install lua5.3 -y
|
||||
- name: Get Version
|
||||
id: actual-get-info
|
||||
id: lua-related
|
||||
shell: lua {0}
|
||||
run: |
|
||||
echo "::set-output name=name::$(lua .github/workflows/getVersion.lua -name)"
|
||||
echo "::set-output name=apkCode::$(lua .github/workflows/getVersion.lua -apkCode)"
|
||||
echo "::set-output name=code::$(lua .github/workflows/getVersion.lua -code)"
|
||||
echo "::set-output name=release::$(lua .github/workflows/getVersion.lua -release)"
|
||||
local version = require 'version'
|
||||
print("::set-output name=name::"..version.string)
|
||||
print(("::set-output name=apkCode::%d"):format(version.apkCode))
|
||||
print(("::set-output name=code::%d"):format(version.code))
|
||||
print("::set-output name=release::"..version.string:gsub("V","",1))
|
||||
- name: Get Commit
|
||||
id: git-related
|
||||
shell: bash
|
||||
echo "::set-output name=commit::$(git rev-parse --short ${{ GITHUB.SHA }})"
|
||||
|
||||
build-windows:
|
||||
@@ -51,7 +56,7 @@ jobs:
|
||||
with:
|
||||
name: Techmino_pre${{ needs.get-info.outputs.release }}_${{ needs.get-info.outputs.commit }}_Windows
|
||||
path: love
|
||||
|
||||
|
||||
build-linux:
|
||||
runs-on: ubuntu-20.04
|
||||
needs: get-info
|
||||
|
||||
Reference in New Issue
Block a user