Skip to content

Commit f5298c6

Browse files
committed
chore(release): Release version 0.2.0
2 parents 2e065af + 946ed69 commit f5298c6

20 files changed

+1098
-406
lines changed

.bumpversion.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# SPDX-License-Identifier: Apache-2.0 OR MIT
44

55
[tool.bumpversion]
6-
current_version = "0.1.0"
6+
current_version = "0.2.0"
77

88
[[tool.bumpversion.files]]
99
filename = "build.zig.zon"

.github/dependabot.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ updates:
88
directory: "/"
99
schedule:
1010
interval: "weekly"
11+
open-pull-requests-limit: 10

.github/workflows/CI.yaml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,20 +23,27 @@ jobs:
2323
- ubuntu
2424
- macos
2525
- windows
26+
version-alias:
27+
- minimum
28+
- latest
2629
include:
2730
- os-alias: ubuntu
2831
os: ubuntu-24.04
2932
- os-alias: macos
3033
os: macos-14
3134
- os-alias: windows
3235
os: windows-2022
36+
- version-alias: minimum
37+
version: "0.15.1"
38+
- version-alias: latest
39+
version: "latest"
3340
steps:
3441
- name: Checkout code
35-
uses: actions/checkout@v4
42+
uses: actions/checkout@v5
3643
- name: Setup Zig environment
37-
uses: goto-bus-stop/setup-zig@v2.2.1
44+
uses: mlugg/setup-zig@v2.0.5
3845
with:
39-
version: 0.14.0
46+
version: ${{ matrix.version }}
4047
- name: Build a project
4148
run: zig build --summary all
4249
- name: Build examples
@@ -49,10 +56,10 @@ jobs:
4956
runs-on: ubuntu-24.04
5057
steps:
5158
- name: Checkout code
52-
uses: actions/checkout@v4
59+
uses: actions/checkout@v5
5360
- name: Setup Zig environment
54-
uses: goto-bus-stop/setup-zig@v2.2.1
61+
uses: mlugg/setup-zig@v2.0.5
5562
with:
56-
version: 0.14.0
63+
version: "latest"
5764
- name: Check code formatted
5865
run: zig fmt --check .

.github/workflows/REUSE.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ jobs:
1717
runs-on: ubuntu-24.04
1818
steps:
1919
- name: Checkout code
20-
uses: actions/checkout@v4
20+
uses: actions/checkout@v5
2121
- name: REUSE Compliance Check
2222
uses: fsfe/reuse-action@v5.0.0

.github/workflows/actionlint.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
runs-on: ubuntu-24.04
2323
steps:
2424
- name: Checkout code
25-
uses: actions/checkout@v4
25+
uses: actions/checkout@v5
2626
with:
2727
persist-credentials: false
2828
- name: Check no lint warnings

.github/workflows/dependabot_auto_merge.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
steps:
1919
- name: Dependabot metadata
2020
id: metadata
21-
uses: dependabot/fetch-metadata@v2.3.0
21+
uses: dependabot/fetch-metadata@v2.4.0
2222
with:
2323
github-token: ${{ secrets.GITHUB_TOKEN }}
2424
- name: Approve a PR

.github/workflows/deploy.yaml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# SPDX-FileCopyrightText: 2025 Shun Sakai
2+
#
3+
# SPDX-License-Identifier: Apache-2.0 OR MIT
4+
5+
name: Deployment
6+
7+
on:
8+
push:
9+
tags:
10+
- "v[0-9]+.[0-9]+.[0-9]+"
11+
workflow_dispatch:
12+
13+
permissions:
14+
contents: read
15+
id-token: write
16+
pages: write
17+
18+
concurrency:
19+
group: "pages"
20+
cancel-in-progress: false
21+
22+
jobs:
23+
build:
24+
name: Build
25+
runs-on: ubuntu-24.04
26+
steps:
27+
- name: Checkout code
28+
uses: actions/checkout@v5
29+
- name: Setup Pages
30+
uses: actions/configure-pages@v5
31+
- name: Setup Zig environment
32+
uses: mlugg/setup-zig@v2.0.5
33+
with:
34+
version: "latest"
35+
- name: Build the documentation
36+
run: zig build doc --summary all
37+
- name: Minify the documentation
38+
uses: docker://tdewolff/minify:latest
39+
with:
40+
args: -o zig-out/doc/csscolorparser/ -r zig-out/doc/csscolorparser/
41+
- name: Upload artifact
42+
uses: actions/upload-pages-artifact@v3
43+
with:
44+
path: zig-out/doc/csscolorparser
45+
46+
deploy:
47+
name: Deploy
48+
needs: build
49+
runs-on: ubuntu-24.04
50+
environment:
51+
name: github-pages
52+
url: ${{ steps.deployment.outputs.page_url }}
53+
steps:
54+
- name: Deploy to GitHub Pages
55+
id: deployment
56+
uses: actions/deploy-pages@v4

CHANGELOG.adoc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,17 @@ All notable changes to this project will be documented in this file.
1414
The format is based on https://keepachangelog.com/[Keep a Changelog], and this
1515
project adheres to https://semver.org/[Semantic Versioning].
1616

17+
== {compare-url}/v0.1.0\...v0.2.0[0.2.0] - 2025-08-22
18+
19+
=== Changed
20+
21+
* Migrate to Zig version 0.15.1 ({pull-request-url}/11[#11])
22+
23+
=== Fixed
24+
25+
* Change `Color.name()` to return `null` if the given color is not fully opaque
26+
({pull-request-url}/4[#4])
27+
1728
== {project-url}/releases/tag/v0.1.0[0.1.0] - 2025-04-28
1829

1930
=== Added

README.md

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -45,25 +45,11 @@ exe.root_module.addImport("csscolorparser", csscolorparser.module("csscolorparse
4545

4646
### Documentation
4747

48-
To build the documentation:
49-
50-
```sh
51-
zig build doc
52-
```
53-
54-
The result is generated in `zig-out/doc/csscolorparser`.
55-
56-
If you want to preview this, run a HTTP server locally. For example:
57-
58-
```sh
59-
python -m http.server -d zig-out/doc/csscolorparser
60-
```
61-
62-
Then open `http://localhost:8000/` in your browser.
48+
See the [documentation][docs-url] for more details.
6349

6450
## Zig version
6551

66-
This library is compatible with Zig version 0.14.0.
52+
This library is compatible with Zig version 0.15.1.
6753

6854
## Source code
6955

@@ -111,6 +97,7 @@ licensing information.
11197
[lab-lch]: https://www.w3.org/TR/css-color-4/#specifying-lab-lch
11298
[oklab-oklch]: https://www.w3.org/TR/css-color-4/#specifying-oklab-oklch
11399
[`color()`]: https://www.w3.org/TR/css-color-4/#color-function
100+
[docs-url]: https://sorairolake.github.io/csscolorparser-zig/
114101
[CHANGELOG.adoc]: CHANGELOG.adoc
115102
[CONTRIBUTING.adoc]: CONTRIBUTING.adoc
116103
[`csscolorparser`]: https://crates.io/crates/csscolorparser

build.zig

Lines changed: 26 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,31 @@ pub fn build(b: *std.Build) void {
88
const target = b.standardTargetOptions(.{});
99
const optimize = b.standardOptimizeOption(.{});
1010

11-
const lib_mod = b.addModule("csscolorparser", .{ .root_source_file = b.path("src/root.zig") });
11+
const csscolorparser_mod = b.addModule(
12+
"csscolorparser",
13+
.{ .root_source_file = b.path("src/root.zig") },
14+
);
1215

1316
const unit_test_step = b.step("unit-test", "Run only the unit tests");
1417
const unit_tests = b.addTest(.{
15-
.root_source_file = b.path("src/root.zig"),
16-
.target = target,
17-
.optimize = optimize,
18+
.root_module = b.createModule(.{
19+
.root_source_file = b.path("src/root.zig"),
20+
.target = target,
21+
.optimize = optimize,
22+
}),
1823
});
1924
const run_unit_tests = b.addRunArtifact(unit_tests);
2025
unit_test_step.dependOn(&run_unit_tests.step);
2126

2227
const integration_test_step = b.step("integration-test", "Run only the integration tests");
2328
const integration_tests = b.addTest(.{
24-
.root_source_file = b.path("tests/root.zig"),
25-
.target = target,
26-
.optimize = optimize,
29+
.root_module = b.createModule(.{
30+
.root_source_file = b.path("tests/root.zig"),
31+
.target = target,
32+
.optimize = optimize,
33+
}),
2734
});
28-
integration_tests.root_module.addImport("csscolorparser", lib_mod);
35+
integration_tests.root_module.addImport("csscolorparser", csscolorparser_mod);
2936
const run_integration_tests = b.addRunArtifact(integration_tests);
3037
integration_test_step.dependOn(&run_integration_tests.step);
3138

@@ -36,9 +43,11 @@ pub fn build(b: *std.Build) void {
3643
const doc_step = b.step("doc", "Build the package documentation");
3744
const doc_obj = b.addObject(.{
3845
.name = "csscolorparser",
39-
.root_source_file = b.path("src/root.zig"),
40-
.target = target,
41-
.optimize = optimize,
46+
.root_module = b.createModule(.{
47+
.root_source_file = b.path("src/root.zig"),
48+
.target = target,
49+
.optimize = optimize,
50+
}),
4251
});
4352
const install_doc = b.addInstallDirectory(.{
4453
.source_dir = doc_obj.getEmittedDocs(),
@@ -52,11 +61,13 @@ pub fn build(b: *std.Build) void {
5261
inline for (example_names) |example_name| {
5362
const example = b.addExecutable(.{
5463
.name = example_name,
55-
.root_source_file = b.path("examples/" ++ example_name ++ ".zig"),
56-
.target = target,
57-
.optimize = optimize,
64+
.root_module = b.createModule(.{
65+
.root_source_file = b.path("examples/" ++ example_name ++ ".zig"),
66+
.target = target,
67+
.optimize = optimize,
68+
}),
5869
});
59-
example.root_module.addImport("csscolorparser", lib_mod);
70+
example.root_module.addImport("csscolorparser", csscolorparser_mod);
6071
const install_example = b.addInstallArtifact(example, .{});
6172
example_step.dependOn(&example.step);
6273
example_step.dependOn(&install_example.step);

0 commit comments

Comments
 (0)