-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
2,685 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: Release tarball | ||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
release_tarball: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Make tarball | ||
run: | | ||
./zig build | ||
tar -czf flow-themes.tar.gz zig-out | ||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref_name }}-${{ github.sha }} | ||
release_name: Tarball release | ||
body: Tarball release | ||
draft: false | ||
prerelease: false | ||
|
||
- name: Upload Release Asset | ||
id: 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: ./flow-themes.tar.gz | ||
asset_name: flow-themes.tar.gz | ||
asset_content_type: application/gzip |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
/.cache/ | ||
/zig-*/ | ||
/themes/ |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
const std = @import("std"); | ||
|
||
pub fn build(b: *std.Build) void { | ||
const target = b.standardTargetOptions(.{}); | ||
|
||
const cbor_mod = b.createModule(.{ .root_source_file = .{ .path = "src/cbor.zig" } }); | ||
const theme_mod = b.createModule(.{ .root_source_file = .{ .path = "src/theme.zig" } }); | ||
const themes_compile = b.addExecutable(.{ | ||
.name = "themes_compile", | ||
.target = target, | ||
.root_source_file = .{ .path = "src/compile.zig" }, | ||
}); | ||
add_themes(b, themes_compile); | ||
themes_compile.root_module.addImport("cbor", cbor_mod); | ||
themes_compile.root_module.addImport("theme", theme_mod); | ||
// b.installArtifact(themes_compile); | ||
const themes_compile_step = b.addRunArtifact(themes_compile); | ||
const themes_compile_output = themes_compile_step.addOutputFileArg("themes.zig"); | ||
b.getInstallStep().dependOn(&b.addInstallFileWithDir(themes_compile_output, .{ .custom = "src" }, "themes.zig").step); | ||
b.installFile("src/theme.zig", "src/theme.zig"); | ||
b.installFile("src/build-dest.zig", "./build.zig"); | ||
} | ||
|
||
fn theme_file(b: *std.Build, exe: anytype, comptime dep_name: []const u8, comptime sub_path: []const u8) void { | ||
const dep = b.dependency("theme_" ++ dep_name, .{}); | ||
exe.root_module.addImport(sub_path, b.createModule(.{ .root_source_file = dep.path(sub_path) })); | ||
} | ||
|
||
fn add_themes(b: *std.Build, exe: anytype) void { | ||
theme_file(b, exe, "1984", "themes/1984-color-theme.json"); | ||
theme_file(b, exe, "1984", "themes/1984-cyberpunk-color-theme.json"); | ||
theme_file(b, exe, "1984", "themes/1984-orwell-color-theme.json"); | ||
theme_file(b, exe, "1984", "themes/1984-light-color-theme.json"); | ||
theme_file(b, exe, "cobalt2", "theme/cobalt2.json"); | ||
theme_file(b, exe, "oldschool", "themes/oldschool-gray-color-theme.json"); | ||
theme_file(b, exe, "oldschool", "themes/oldschool-terminal-green.json"); | ||
theme_file(b, exe, "turbo_colors", "themes/Turbo Colors-color-theme.json"); | ||
theme_file(b, exe, "vscode", "extensions/theme-tomorrow-night-blue/themes/tomorrow-night-blue-color-theme.json"); | ||
theme_file(b, exe, "vscode", "extensions/theme-monokai/themes/monokai-color-theme.json"); | ||
theme_file(b, exe, "vscode", "extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json"); | ||
theme_file(b, exe, "vscode", "extensions/theme-solarized-light/themes/solarized-light-color-theme.json"); | ||
theme_file(b, exe, "vscode", "extensions/theme-kimbie-dark/themes/kimbie-dark-color-theme.json"); | ||
theme_file(b, exe, "vscode", "extensions/theme-defaults/themes/dark_modern.json"); | ||
theme_file(b, exe, "vscode", "extensions/theme-defaults/themes/dark_plus.json"); | ||
theme_file(b, exe, "vscode", "extensions/theme-defaults/themes/dark_vs.json"); | ||
theme_file(b, exe, "vscode", "extensions/theme-defaults/themes/light_modern.json"); | ||
theme_file(b, exe, "vscode", "extensions/theme-defaults/themes/light_plus.json"); | ||
theme_file(b, exe, "vscode", "extensions/theme-defaults/themes/light_vs.json"); | ||
theme_file(b, exe, "CRT", "themes/CRT-64-color-theme.json"); | ||
theme_file(b, exe, "CRT", "themes/CRT-Amber-color-theme.json"); | ||
theme_file(b, exe, "CRT", "themes/CRT-Gray-color-theme.json"); | ||
theme_file(b, exe, "CRT", "themes/CRT-Green-color-theme.json"); | ||
theme_file(b, exe, "CRT", "themes/CRT-Paper-color-theme.json"); | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
0.12.0-dev.2341+92211135f |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
.{ | ||
.name = "flow-themes", | ||
.version = "0.0.1", | ||
|
||
.dependencies = .{ | ||
|
||
// themes | ||
.theme_1984 = .{ | ||
.url = "https://github.com/juanmnl/vs-1984/archive/983c9bd674d2aedd9edb6f18b2d62c31a2f9eae7.tar.gz", | ||
.hash = "1220fba79c5688d869aa2207e3e9b174a985bf298b9017f463e9e3a5fbb7668b86d9", | ||
}, | ||
.theme_cobalt2 = .{ | ||
.url = "https://github.com/wesbos/cobalt2-vscode/archive/542ecdfcff52c5175b85438de237ba88e7f6c140.tar.gz", | ||
.hash = "1220b860fa41d1d90450518e76096bcd9473d7e3e5e4ed01d3578ae4fe10175e9981", | ||
}, | ||
.theme_oldschool = .{ | ||
.url = "https://github.com/EricsonWillians/oldschool-theme/archive/15f472028b56ac58495d6bf4ecd7d173320646f0.tar.gz", | ||
.hash = "12207eb3983e2ecd7e91c299e7a9dc77b13d44fd5d6bada1928f2d6864c0036691cf", | ||
}, | ||
.theme_turbo_colors = .{ | ||
.url = "https://github.com/metropolian/theme-turbo/archive/fc6765cad1d28a418666458f80f6b863090f0a49.tar.gz", | ||
.hash = "122019d9e3f76e9b866131e1dc9cea2b77a12a278a5f253d5b8d6c9ea92c92e1fc06", | ||
}, | ||
.theme_vscode = .{ | ||
.url = "https://github.com/microsoft/vscode/archive/fd2db103459c82eb77d36bb968d3b98137cda5b4.tar.gz", | ||
.hash = "12207d7292daa0811be527c42e4071357bc248328691a426f9836369fa54cc9f7200", | ||
}, | ||
.theme_CRT = .{ | ||
.url = "https://github.com/neurocyte/crt-themes/releases/download/master-4705c3761dd0fbc3b5ae85f1c39f0e9fe8f6ce5a/crt-themes.tar.gz", | ||
.hash = "1220da8b8fe19481e05ca1678a97656532bfbba69b898d215d879e7f2b28fb903783", | ||
}, | ||
}, | ||
.paths = .{ | ||
"build.zig", | ||
"build.zig.zon", | ||
}, | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
const std = @import("std"); | ||
|
||
pub fn build(b: *std.Build) void { | ||
const theme_mod = b.addModule("theme", .{ | ||
.root_source_file = .{ .path = "src/theme.zig" }, | ||
}); | ||
|
||
_ = b.addModule("themes", .{ | ||
.root_source_file = .{ .path = "src/themes.zig" }, | ||
.imports = &.{ | ||
.{ .name = "theme", .module = theme_mod }, | ||
}, | ||
}); | ||
} |
Oops, something went wrong.