Skip to content

Commit

Permalink
release
Browse files Browse the repository at this point in the history
  • Loading branch information
jmesrje committed Dec 15, 2024
1 parent 14fbf89 commit 494ed62
Show file tree
Hide file tree
Showing 23 changed files with 211 additions and 1,070 deletions.
34 changes: 34 additions & 0 deletions .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Bug Report
description: Report an issue you come across in this project
labels: ["bug", "triage", "review"]
body:
- type: checkboxes
id: check
attributes:
label: Original
description: Be sure that a change related to this issue isn't already pending, and a similar issue does not exist.
options:
- label: My issue is original
required: true
- type: textarea
id: description
attributes:
label: Description
description: Give a detailed description on the bug you are experiencing.
validations:
required: true
- type: textarea
id: repro
attributes:
label: Reproduction
description: A bullet-pointed list in the order to reproduce the bug.
validations:
required: true
- type: textarea
id: logs
attributes:
label: Output
description: Copy the exact error, and omit the date + time prefixes if any.
render: shell
validations:
required: true
26 changes: 26 additions & 0 deletions .github/ISSUE_TEMPLATE/enhancement.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Enhancement
description: Request a feature that you think would be nice to include in this project
labels: ["enhancement", "triage", "review"]
body:
- type: checkboxes
id: check
attributes:
label: Original
description: Be sure that a change related to this issue isn't already pending, and a similar issue does not exist.
options:
- label: My issue is original
required: true
- type: textarea
id: description
attributes:
label: Description
description: Give a detailed description on the feature you're proposing.
validations:
required: true
- type: textarea
id: repro
attributes:
label: Objective
description: What should this feature achieve, and why should it be added?
validations:
required: true
6 changes: 3 additions & 3 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ By submitting this pull request for maintainer review, you agree to the followin

<!-- If your pull request doesn't comply with these, it will be ignored until it does -->

- [ ] I give full permission for maintainers and contributors of this repository to change my code in any way.
- [ ] I am open to this pull request being a part of a completely open source repository which can be modified at any time, and I abide by the license terms.
- [ ] To the best of my knowledge, there are no bugs present in this pull request.
- [ ] I give permission to maintainers to modify my code
- [ ] My code abides by the license selected for this repository
- [ ] To the best of my knowledge, there are no bugs present in this pull request
102 changes: 17 additions & 85 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Draft
name: Rekease

on:
push:
Expand All @@ -20,54 +20,41 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: "main"
ref: 'main'

- name: Update changelog
id: update-changelog
uses: thomaseizinger/[email protected]
with:
tag: ${{ github.ref_name }}
changelogPath: "docs/changelog.md"

- name: Bump Wally version
id: version-bump
uses: DervexDev/file-version-bumper@v1
with:
path: ./wally.toml
changelogPath: 'docs/changelog.md'

- name: Commit and push
uses: EndBug/add-and-commit@v9
if: ${{ github.ref_name != steps.version-bump.outputs.old_version }}
with:
message: Bump version to ${{ github.ref_name }}
default_author: github_actions

- name: Update tag
if: ${{ github.ref_name != steps.version-bump.outputs.old_version }}
run: |
git tag -f ${{ github.ref_name }}
git push -f --tags
publish-build:
name: Publish Assets
name: Publish Build
runs-on: ubuntu-latest
needs: bump
steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Setup Rokit
uses: CompeyDev/[email protected]
- name: Setup Pesde
uses: 2jammers/[email protected]
with:
cache: 'true'
pesde-version: 'v0.5.1+registry.0.1.0'

- name: Install Wally dependencies
run: wally install
- name: Install dependencies
run: pesde install

- name: Generate sourcemap
run: rojo sourcemap standalone.project.json --output sourcemap.json

- name: Generate package types
run: wally-package-types --sourcemap sourcemap.json Packages

- name: Format code
run: stylua src/

Expand Down Expand Up @@ -95,67 +82,12 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Rokit
uses: CompeyDev/[email protected]

- name: Log In
env:
WALLY_AUTH: ${{ secrets.WALLY_AUTH_TOKEN }}
run: |
mkdir ~/.wally
printenv WALLY_AUTH > ~/.wally/auth.toml
- name: Setup Pesde
uses: 2jammers/[email protected]
with:
pesde-version: 'v0.5.1+registry.0.1.0'
token: '${{ secrets.PESDE_TOKEN }}'

- name: Publish
run: |
wally publish
publish-announcement:
name: Publish Announcement
runs-on: ubuntu-latest
needs: [publish-package, publish-build]
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Get project information
id: project_info
run: |
echo "REPO_NAME=${{ github.repository }}" >> $GITHUB_ENV
echo "RELEASE_TAG=${{ github.ref_name }}" >> $GITHUB_ENV
- name: Send webhook
uses: actions/github-script@v6
with:
script: |
const net = require('node-fetch');
const projectRole = "1298443968794722334";
const webhookUrl = process.env.WEBHOOK_URL;
const projectName = process.env.REPO_NAME;
const formattedProjectName = projectName.charAt(0).toUpperCase() + projectName.slice(1);
const tag = process.env.RELEASE_TAG;
const body = {
content: `<@&${projectRole}>`,
embeds: [
{
title: `Release ${tag} · ${formattedProjectName}`,
description: `Release notification for the latest version of ${formattedProjectName}`,
url: `https://github.com/luminlabsdev/${projectName}/releases/tag/${tag}`,
color: 7506646,
author: {
name: "GitHub",
},
},
],
};

const response = await net(webhookUrl, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(body),
});

if (!response.ok) {
throw new Error(`${response.status}: ${response.statusText}`);
}
pesde publish -y
3 changes: 0 additions & 3 deletions .vscode/settings.json

This file was deleted.

6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
[![ci](https://img.shields.io/github/actions/workflow/status/lumin-org/ui/release.yml?style=plastic&logo=github&logoColor=FFFFFF&label=ci)](https://github.com/lumin-org/ui/blob/main/.github/workflows/release.yml)
[![discord](https://img.shields.io/discord/1105688855375511642?logo=discord&logoColor=white&label=chat&color=4d3dff&style=plastic)](https://lumin-org.github.io/to/discord)

A small, fast, and efficient UI framework that has a small learning curve.
A light, fast, and efficient UI framework that has a small learning curve.

## Prerequisites

In order to use **lumin/ui** you must have the following dependencies installed:

* [`[email protected].0-rc.18`](https://github.com/pesde-pkg/pesde)
* [`[email protected]`](https://github.com/rojo-rbx/rojo)
* [`[email protected].1+registry.0.1.0^`](https://github.com/pesde-pkg/pesde)
* [`[email protected]^`](https://github.com/rojo-rbx/rojo)

## Usage

Expand Down
8 changes: 2 additions & 6 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Changed

- Migrates to new github actions and changelog format

### Added

- Added Rokit as the default package manager
- Complete rewrite

## [0.2.3] - 2024-07-25

Expand All @@ -34,7 +30,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed

- Fixed infinite error on spring destruction bug ( [#5 by @dazscripts](https://github.com/lumin-dev/Aegis/pull/5) )
- Fixed infinite error on spring destruction bug ( [#5 by @dazscripts](https://github.com/lumin-org/ui/pull/5) )

## [0.2.1] - 2024-07-06

Expand Down
14 changes: 12 additions & 2 deletions pesde.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
name = "lumin/ui"
version = "0.3.0-rc1"
description = "A lightweight and embeddable UI framework"
description = "A small, fast, and efficient UI framework that has a small learning curve"
authors = ["2jammers"]
repository = "https://github.com/luminlabsdev/ui"
repository = "https://github.com/lumin-org/ui"
license = "MIT"
includes = [
"pesde.toml",
"README.md",
"LICENSE",
"src",
]

[target]
environment = "roblox"
lib = "src/init.luau"
build_files = ["src"]

[indices]
default = "https://github.com/daimond113/pesde-index"
Expand All @@ -18,6 +26,8 @@ sourcemap_generator = ".pesde/scripts/sourcemap_generator.luau"
[dev_dependencies]
scripts = { name = "pesde/scripts_rojo", version = "^0.1.0", target = "lune" }
rojo = { name = "pesde/rojo", version = "^7.4.4", target = "lune" }
stylua = { name = "pesde/stylua", version = "^2.0.1", target = "lune" }

[dependencies]
debugger = { name = "lumin/debugger", version = "^0.5.0" }
spr = { name = "2jammers/spr", version = "^2.1.0" }
12 changes: 6 additions & 6 deletions src/Action.luau
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
-- Variables
local Root = script.Parent
local Types = require(Root.Types)
local Actions: {[string]: Types.Action} = {}
local Actions: { [string]: Types.Action } = {}

-- Functions

Expand All @@ -11,12 +11,12 @@ local Actions: {[string]: Types.Action} = {}
[Open Documentation](https://lumin-org.github.io/ui/api/#action)
]=]
local function New(name: string, apply: (Instance) -> ())
if not Actions[name] then -- Cache the action so a new one is created each time
Actions[name] = apply
end
if not Actions[name] then -- Cache the action so a new one is created each time
Actions[name] = apply
end
end

return {
New = New,
List = Actions,
New = New,
List = Actions,
}
6 changes: 3 additions & 3 deletions src/Apply.luau
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ local Types = require(Root.Types)
-- Module

return function(instance: Instance, property: any, value: any)
local PropType = type(property)
local ValueType = type(value)
local PropType = type(property)
local ValueType = type(value)
if PropType == "number" then -- If the property is a modifier
if ValueType == "function" then -- If the value is an action
(value :: Types.Action)(instance)
else -- If the value is an instance
value.Parent = instance
value.Name = property
value.Name = property
end
elseif PropType == "string" then -- If the property is a string
if ValueType == "table" then -- If the value is a constructor
Expand Down
22 changes: 11 additions & 11 deletions src/Change.luau
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@ local Debugger = require(Root.Parent.roblox_packages.debugger)
[Open Documentation](https://lumin-org.github.io/ui/api/actions/#change)
]=]
return function(prop: string, callback: (changed: any) -> ()): Types.Action
if not Action.List["Changed"] then
Action.New("Changed", function(instance)
local Success, Event = pcall(instance.GetPropertyChangedSignal, instance :: any, prop :: any) -- Ensure prop exists
if not Success or type(callback) ~= "function" then
Debugger.Fatal("InvalidPropOrEvent", prop)
end
Event:Connect(function()
callback((instance :: any)[prop]) -- Pass new value through callback
end)
end)
end
if not Action.List["Changed"] then
Action.New("Changed", function(instance)
local Success, Event = pcall(instance.GetPropertyChangedSignal, instance :: any, prop :: any) -- Ensure prop exists
if not Success or type(callback) ~= "function" then
Debugger.Fatal("InvalidPropOrEvent", prop)
end
Event:Connect(function()
callback((instance :: any)[prop]) -- Pass new value through callback
end)
end)
end
return Action.List["Changed"]
end
Loading

0 comments on commit 494ed62

Please sign in to comment.