(feat) Place-only settings & Small changes #6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | ||
on: | ||
push: | ||
tags: | ||
- "v*.*.*" | ||
jobs: | ||
create-release: | ||
name: Create Release | ||
runs-on: ubuntu-latest | ||
outputs: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
steps: | ||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: ${{ github.ref }} | ||
draft: true | ||
build plugin: | ||
runs-on: ubuntu-latest | ||
needs: ["create-release"] | ||
name: Build Roblox Studio Plugin | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: ok-nick/[email protected] | ||
- name: Run selene | ||
run: selene src | ||
working-directory: plugin | ||
- name: Run stylua | ||
run: stylua -c src | ||
working-directory: plugin | ||
- name: Generate sourcemap | ||
run: rojo sourcemap default.project.json --output sourcemap.json | ||
working-directory: plugin | ||
- name: Download global Roblox types | ||
shell: bash | ||
run: curl -s -O https://raw.githubusercontent.com/JohnnyMorganz/luau-lsp/master/scripts/globalTypes.d.lua | ||
- name: Run Luau Analyze | ||
run: luau-lsp analyze --sourcemap=sourcemap.json --defs=../globalTypes.d.lua --no-strict-dm-types src | ||
working-directory: plugin | ||
- name: Build Plugin | ||
run: rojo build plugin -o Plugin.rbxm | ||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: Plugin.rbxm | ||
path: Plugin.rbxm | ||
- name: Upload Plugin to Release | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ needs.create-release.outputs.upload_url }} | ||
asset_path: Plugin.rbxm | ||
asset_name: Plugin.rbxm | ||
asset_content_type: application/octet-stream | ||
build exe: | ||
runs-on: ubuntu-latest | ||
needs: ["create-release"] | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18 | ||
- name: Install dependencies | ||
run: npm install | ||
- | ||
- name: Build with Nexe | ||
run: node build.js | ||
- name: Upload Binary Artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: StyLua-Roblox.exe | ||
path: StyLua-Roblox.exe | ||
- name: Upload release assets to GitHub | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ needs.create-release.outputs.upload_url }} | ||
asset_path: StyLua-Roblox.exe | ||
asset_name: StyLua-Roblox.exe | ||
asset_content_type: application/octet-stream |