actions: embed lua into yaml
This commit is contained in:
23
.github/workflows/dev.yml
vendored
23
.github/workflows/dev.yml
vendored
@@ -10,21 +10,26 @@ jobs:
|
|||||||
get-info:
|
get-info:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
outputs:
|
outputs:
|
||||||
name: ${{ steps.actual-get-info.outputs.name }}
|
name: ${{ steps.lua-related.outputs.name }}
|
||||||
apkCode: ${{ steps.actual-get-info.outputs.apkCode }}
|
apkCode: ${{ steps.lua-related.outputs.apkCode }}
|
||||||
code: ${{ steps.actual-get-info.outputs.code }}
|
code: ${{ steps.lua-related.outputs.code }}
|
||||||
commit: ${{ steps.actual-get-info.outputs.commit }}
|
commit: ${{ steps.git-related.outputs.commit }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Install lua
|
- name: Install lua
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get install lua5.3 -y
|
sudo apt-get install lua5.3 -y
|
||||||
- name: Get Version
|
- name: Get Version
|
||||||
id: actual-get-info
|
id: lua-related
|
||||||
|
shell: lua {0}
|
||||||
run: |
|
run: |
|
||||||
echo "::set-output name=name::$(lua .github/workflows/getVersion.lua -name)"
|
local version = require 'version'
|
||||||
echo "::set-output name=apkCode::$(lua .github/workflows/getVersion.lua -apkCode)"
|
print("::set-output name=name::"..version.string)
|
||||||
echo "::set-output name=code::$(lua .github/workflows/getVersion.lua -code)"
|
print(("::set-output name=apkCode::%d"):format(version.apkCode))
|
||||||
|
print(("::set-output name=code::%d"):format(version.code))
|
||||||
|
- name: Get Commit
|
||||||
|
id: git-related
|
||||||
|
shell: bash
|
||||||
echo "::set-output name=commit::$(git rev-parse --short ${{ GITHUB.SHA }})"
|
echo "::set-output name=commit::$(git rev-parse --short ${{ GITHUB.SHA }})"
|
||||||
|
|
||||||
automatic-test:
|
automatic-test:
|
||||||
@@ -105,7 +110,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: Techmino_${{ needs.get-info.outputs.name }}_${{ GITHUB.RUN_NUMBER }}_${{ needs.get-info.outputs.commit }}_Android
|
name: Techmino_${{ needs.get-info.outputs.name }}_${{ GITHUB.RUN_NUMBER }}_${{ needs.get-info.outputs.commit }}_Android
|
||||||
path: Techmino_Snapshot.apk
|
path: Techmino_Snapshot.apk
|
||||||
|
|
||||||
build-android-mini:
|
build-android-mini:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
needs: get-info
|
needs: get-info
|
||||||
|
|||||||
28
.github/workflows/getVersion.lua
vendored
28
.github/workflows/getVersion.lua
vendored
@@ -1,28 +0,0 @@
|
|||||||
local arg=arg[1]
|
|
||||||
if arg=="-apkCode"then
|
|
||||||
local code=require"version".apkCode
|
|
||||||
print(code)
|
|
||||||
elseif arg=="-code"then
|
|
||||||
local str=require"version".code
|
|
||||||
print(str)
|
|
||||||
elseif arg=="-name"then
|
|
||||||
local str=require"version".string
|
|
||||||
print(str)
|
|
||||||
elseif arg=="-release"then
|
|
||||||
local str=require"version".string:gsub("V","",1)
|
|
||||||
print(str)
|
|
||||||
elseif arg=="-updateTitle"then
|
|
||||||
local note=require"parts.updateLog"
|
|
||||||
local p1=note:find("\n%d")+1
|
|
||||||
local p2=note:find("\n",p1)-1
|
|
||||||
note=note:sub(p1,p2)
|
|
||||||
print(note)
|
|
||||||
elseif arg=="-updateNote"then
|
|
||||||
local note=require"parts.updateLog"
|
|
||||||
local p1=note:find("\n",note:find("\n%d")+1)+1
|
|
||||||
local p2=note:find("\n%d",p1+1)
|
|
||||||
note=note:sub(p1,p2-2)
|
|
||||||
:gsub(" ","- ")
|
|
||||||
:gsub(" ","# ")
|
|
||||||
print(note)
|
|
||||||
end
|
|
||||||
49
.github/workflows/release.yml
vendored
49
.github/workflows/release.yml
vendored
@@ -9,31 +9,44 @@ jobs:
|
|||||||
get-info:
|
get-info:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
outputs:
|
outputs:
|
||||||
name: ${{ steps.actual-get-info.outputs.name }}
|
name: ${{ steps.lua-related.outputs.name }}
|
||||||
apkCode: ${{ steps.actual-get-info.outputs.apkCode }}
|
apkCode: ${{ steps.lua-related.outputs.apkCode }}
|
||||||
code: ${{ steps.actual-get-info.outputs.code }}
|
code: ${{ steps.lua-related.outputs.code }}
|
||||||
release: ${{ steps.actual-get-info.outputs.release }}
|
release: ${{ steps.lua-related.outputs.release }}
|
||||||
updateTitle: ${{ steps.actual-get-info.outputs.updateTitle }}
|
updateTitle: ${{ steps.lua-related.outputs.updateTitle }}
|
||||||
updateNote: ${{ steps.actual-get-info.outputs.updateNote }}
|
updateNote: ${{ steps.lua-related.outputs.updateNote }}
|
||||||
commit: ${{ steps.actual-get-info.outputs.commit }}
|
commit: ${{ steps.git-related.outputs.commit }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Install lua
|
- name: Install lua
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get install lua5.3 -y
|
sudo apt-get install lua5.3 -y
|
||||||
- name: Get Version
|
- name: Get Version
|
||||||
id: actual-get-info
|
id: lua-related
|
||||||
|
shell: lua {0}
|
||||||
run: |
|
run: |
|
||||||
UPDATE_NOTE=$(lua .github/workflows/getVersion.lua -updateNote)
|
local version = require 'version'
|
||||||
UPDATE_NOTE="${UPDATE_NOTE//'%'/'%25'}"
|
print("::set-output name=name::"..version.string)
|
||||||
UPDATE_NOTE="${UPDATE_NOTE//$'\n'/'%0A'}"
|
print(("::set-output name=apkCode::%d"):format(version.apkCode))
|
||||||
UPDATE_NOTE="${UPDATE_NOTE//$'\r'/'%0D'}"
|
print(("::set-output name=code::%d"):format(version.code))
|
||||||
echo "::set-output name=name::$(lua .github/workflows/getVersion.lua -name)"
|
print("::set-output name=release::"..version.string:gsub("V", "", 1))
|
||||||
echo "::set-output name=apkCode::$(lua .github/workflows/getVersion.lua -apkCode)"
|
|
||||||
echo "::set-output name=code::$(lua .github/workflows/getVersion.lua -code)"
|
local note = require 'parts.updateLog'
|
||||||
echo "::set-output name=release::$(lua .github/workflows/getVersion.lua -release)"
|
local p1 = note:find("\n%d") + 1
|
||||||
echo "::set-output name=updateTitle::$(lua .github/workflows/getVersion.lua -updateTitle)"
|
local p2 = note:find("\n", p1) - 1
|
||||||
echo "::set-output name=updateNote::$UPDATE_NOTE"
|
print("::set-output name=updateTitle::"..note:sub(p1, p2))
|
||||||
|
|
||||||
|
local p3 = note:find("\n", note:find("\n%d") + 1) + 1
|
||||||
|
local p4 = note:find("\n%d", p3 + 1)
|
||||||
|
print("::set-output name=updateNote::"..note:sub(p3, p4 - 2)
|
||||||
|
:gsub(" ", "- ")
|
||||||
|
:gsub(" ", "# ")
|
||||||
|
:gsub('%', '%25')
|
||||||
|
:gsub('\n', '%0A')
|
||||||
|
:gsub('\r', '%0D'))
|
||||||
|
- name: Get Commit
|
||||||
|
id: git-related
|
||||||
|
shell: bash
|
||||||
echo "::set-output name=commit::$(git rev-parse --short ${{ GITHUB.SHA }})"
|
echo "::set-output name=commit::$(git rev-parse --short ${{ GITHUB.SHA }})"
|
||||||
|
|
||||||
build-windows-x64:
|
build-windows-x64:
|
||||||
|
|||||||
27
.github/workflows/test.yml
vendored
27
.github/workflows/test.yml
vendored
@@ -9,23 +9,28 @@ jobs:
|
|||||||
get-info:
|
get-info:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
outputs:
|
outputs:
|
||||||
name: ${{ steps.actual-get-info.outputs.name }}
|
name: ${{ steps.lua-related.outputs.name }}
|
||||||
apkCode: ${{ steps.actual-get-info.outputs.apkCode }}
|
apkCode: ${{ steps.lua-related.outputs.apkCode }}
|
||||||
code: ${{ steps.actual-get-info.outputs.code }}
|
code: ${{ steps.lua-related.outputs.code }}
|
||||||
release: ${{ steps.actual-get-info.outputs.release }}
|
release: ${{ steps.lua-related.outputs.release }}
|
||||||
commit: ${{ steps.actual-get-info.outputs.commit }}
|
commit: ${{ steps.git-related.outputs.commit }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Install lua
|
- name: Install lua
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get install lua5.3 -y
|
sudo apt-get install lua5.3 -y
|
||||||
- name: Get Version
|
- name: Get Version
|
||||||
id: actual-get-info
|
id: lua-related
|
||||||
|
shell: lua {0}
|
||||||
run: |
|
run: |
|
||||||
echo "::set-output name=name::$(lua .github/workflows/getVersion.lua -name)"
|
local version = require 'version'
|
||||||
echo "::set-output name=apkCode::$(lua .github/workflows/getVersion.lua -apkCode)"
|
print("::set-output name=name::"..version.string)
|
||||||
echo "::set-output name=code::$(lua .github/workflows/getVersion.lua -code)"
|
print(("::set-output name=apkCode::%d"):format(version.apkCode))
|
||||||
echo "::set-output name=release::$(lua .github/workflows/getVersion.lua -release)"
|
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 }})"
|
echo "::set-output name=commit::$(git rev-parse --short ${{ GITHUB.SHA }})"
|
||||||
|
|
||||||
build-windows:
|
build-windows:
|
||||||
@@ -51,7 +56,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: Techmino_pre${{ needs.get-info.outputs.release }}_${{ needs.get-info.outputs.commit }}_Windows
|
name: Techmino_pre${{ needs.get-info.outputs.release }}_${{ needs.get-info.outputs.commit }}_Windows
|
||||||
path: love
|
path: love
|
||||||
|
|
||||||
build-linux:
|
build-linux:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
needs: get-info
|
needs: get-info
|
||||||
|
|||||||
Reference in New Issue
Block a user