Release Workflow
This commit is contained in:
4
.github/workflows/docs.yml
vendored
4
.github/workflows/docs.yml
vendored
@@ -35,7 +35,9 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
find src -type f -name "*.lua" | while read file; do
|
find src -type f -name "*.lua" | while read file; do
|
||||||
filename=$(basename "$file")
|
filename=$(basename "$file")
|
||||||
lua tools/markdown.lua "$file" "build_docs/docs/references/${filename%.lua}.md"
|
if [ "$filename" != "LuaLS.lua" ]; then
|
||||||
|
lua tools/markdown.lua "$file" "build_docs/docs/references/${filename%.lua}.md"
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
- name: Deploy
|
- name: Deploy
|
||||||
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
|
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
|
||||||
|
|||||||
39
.github/workflows/release.yml
vendored
Normal file
39
.github/workflows/release.yml
vendored
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
name: Create Release
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
paths:
|
||||||
|
- 'version'
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Get Version
|
||||||
|
id: version
|
||||||
|
run: echo "version=$(cat version)" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Create Release
|
||||||
|
id: create_release
|
||||||
|
uses: actions/create-release@v1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
tag_name: v${{ steps.version.outputs.version }}
|
||||||
|
release_name: Release v${{ steps.version.outputs.version }}
|
||||||
|
draft: false
|
||||||
|
prerelease: false
|
||||||
|
|
||||||
|
- name: Upload Release Asset
|
||||||
|
uses: actions/upload-release-asset@v1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||||
|
asset_path: ./release/basalt.lua
|
||||||
|
asset_name: basalt.lua
|
||||||
|
asset_content_type: application/x-lua
|
||||||
@@ -44,7 +44,7 @@ jobs:
|
|||||||
local attr = lfs.attributes(fullPath)
|
local attr = lfs.attributes(fullPath)
|
||||||
if attr.mode == "directory" then
|
if attr.mode == "directory" then
|
||||||
scanDir(fullPath, baseDir .. file .. "/")
|
scanDir(fullPath, baseDir .. file .. "/")
|
||||||
elseif file:match("%.lua$") then
|
elseif file:match("%.lua$") and file ~= "LuaLS.lua" then
|
||||||
table.insert(files, {
|
table.insert(files, {
|
||||||
path = baseDir .. file,
|
path = baseDir .. file,
|
||||||
fullPath = fullPath
|
fullPath = fullPath
|
||||||
|
|||||||
Reference in New Issue
Block a user