Workflow Test
This commit is contained in:
57
.github/workflows/release.yml
vendored
57
.github/workflows/release.yml
vendored
@@ -1,39 +1,58 @@
|
|||||||
name: Create Release
|
name: Create Release
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
workflow_run:
|
||||||
paths:
|
workflows: ["Minify Lua Code"]
|
||||||
- 'version'
|
types:
|
||||||
|
- completed
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
release:
|
||||||
|
if: |
|
||||||
|
github.event.workflow_run.conclusion == 'success' &&
|
||||||
|
contains(github.event.workflow_run.head_commit.modified, 'version')
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Get Version
|
- name: Get Version
|
||||||
id: version
|
id: version
|
||||||
run: echo "version=$(cat version)" >> $GITHUB_OUTPUT
|
run: echo "version=$(cat version)" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Check if version file changed
|
||||||
|
run: |
|
||||||
|
git fetch origin ${{ github.event.workflow_run.head_branch }}
|
||||||
|
if ! git diff --quiet origin/${{ github.event.workflow_run.head_branch }}^1 origin/${{ github.event.workflow_run.head_branch }} -- version; then
|
||||||
|
echo "Version file was changed"
|
||||||
|
else
|
||||||
|
echo "Version file was not changed"
|
||||||
|
exit 1
|
||||||
|
|
||||||
|
# Add version check
|
||||||
|
- name: Check if version exists
|
||||||
|
run: |
|
||||||
|
if git rev-parse "v${{ steps.version.outputs.version }}" >/dev/null 2>&1; then
|
||||||
|
echo "::error::Version v${{ steps.version.outputs.version }} already exists"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Generate changelog
|
||||||
|
id: changelog
|
||||||
|
uses: heinrichreimer/github-changelog-generator-action@v2.3
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Create Release
|
- name: Create Release
|
||||||
id: create_release
|
uses: softprops/action-gh-release@v1
|
||||||
uses: actions/create-release@v1
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
with:
|
with:
|
||||||
tag_name: v${{ steps.version.outputs.version }}
|
tag_name: v${{ steps.version.outputs.version }}
|
||||||
release_name: Release v${{ steps.version.outputs.version }}
|
body_path: CHANGELOG.md
|
||||||
draft: false
|
files: |
|
||||||
prerelease: false
|
CHANGELOG.md
|
||||||
|
release/basalt.lua
|
||||||
- name: Upload Release Asset
|
|
||||||
uses: actions/upload-release-asset@v1
|
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
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
|
|
||||||
|
|||||||
@@ -152,7 +152,8 @@ function VisualElement:getRelativePosition(x, y)
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
---@diagnostic disable-next-line: duplicate-set-field
|
--- Renders the element
|
||||||
|
--- @usage element:render()
|
||||||
function VisualElement:render()
|
function VisualElement:render()
|
||||||
local width, height = self.get("width"), self.get("height")
|
local width, height = self.get("width"), self.get("height")
|
||||||
self:multiBlit(1, 1, width, height, " ", tHex[self.get("foreground")], tHex[self.get("background")])
|
self:multiBlit(1, 1, width, height, " ", tHex[self.get("foreground")], tHex[self.get("background")])
|
||||||
|
|||||||
Reference in New Issue
Block a user