Skip to content

Commit 206c6d3

Browse files
Add third-party licenses to the release artifacts
1 parent 3dd0e74 commit 206c6d3

5 files changed

Lines changed: 102 additions & 1 deletion

File tree

.github/workflows/release.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ name: Release
33
on:
44
release:
55
types: [published]
6+
workflow_dispatch:
67

78
jobs:
89
release:
@@ -29,6 +30,11 @@ jobs:
2930
with:
3031
toolchain: stable
3132
target: ${{ matrix.target }}
33+
- name: Document licenses
34+
shell: bash
35+
run: |
36+
cargo install --locked cargo-about
37+
cargo about generate about.hbs -o licenses.html
3238
- name: Build
3339
shell: bash
3440
run: |
@@ -42,9 +48,15 @@ jobs:
4248
bin="./target/${{ matrix.target }}/release/livetagger"
4349
fi
4450
45-
7z a "livetagger-$tag-${{ matrix.target }}.zip" $bin
51+
7z a "livetagger-$tag-${{ matrix.target }}.zip" $bin licenses.html
52+
- name: Attach artifacts
53+
uses: actions/upload-artifact@v4
54+
with:
55+
name: ${{ matrix.target }}
56+
path: livetagger*
4657
- name: Publish
4758
uses: softprops/action-gh-release@v2
59+
if: github.event_name = "release"
4860
with:
4961
files: "livetagger*"
5062
env:

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
name = "livetagger"
33
version = "0.0.4"
44
edition = "2024"
5+
license = "MIT"
56

67
[workspace]
78
resolver = "3"

about.hbs

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
<html>
2+
3+
<head>
4+
<title>Third Party Licenses</title>
5+
<style>
6+
@media (prefers-color-scheme: dark) {
7+
body {
8+
background: #333;
9+
color: white;
10+
}
11+
a {
12+
color: skyblue;
13+
}
14+
}
15+
.container {
16+
font-family: sans-serif;
17+
max-width: 800px;
18+
margin: 0 auto;
19+
}
20+
.intro {
21+
text-align: center;
22+
}
23+
.licenses-list {
24+
list-style-type: none;
25+
margin: 0;
26+
padding: 0;
27+
}
28+
.license-used-by {
29+
margin-top: -10px;
30+
}
31+
.license-text {
32+
max-height: 200px;
33+
overflow-y: scroll;
34+
white-space: pre-wrap;
35+
}
36+
</style>
37+
</head>
38+
39+
<body>
40+
<main class="container">
41+
<div class="intro">
42+
<h1>Third Party Licenses</h1>
43+
<p>This page lists the licenses of the open-source libraries used in LiveTagger.</p>
44+
</div>
45+
46+
<h2>Overview of licenses:</h2>
47+
<ul class="licenses-overview">
48+
{{#each overview}}
49+
<li><a href="#{{id}}">{{name}}</a> ({{count}})</li>
50+
{{/each}}
51+
</ul>
52+
53+
<h2>All license text:</h2>
54+
<ul class="licenses-list">
55+
{{#each licenses}}
56+
<li class="license">
57+
<h3 id="{{id}}">{{name}}</h3>
58+
<h4>Used by:</h4>
59+
<ul class="license-used-by">
60+
{{#each used_by}}
61+
<li><a href="{{#if crate.repository}} {{crate.repository}} {{else}} https://crates.io/crates/{{crate.name}} {{/if}}">{{crate.name}} {{crate.version}}</a></li>
62+
{{/each}}
63+
</ul>
64+
<pre class="license-text">{{text}}</pre>
65+
</li>
66+
{{/each}}
67+
</ul>
68+
</main>
69+
</body>
70+
71+
</html>

about.toml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
accepted = [
2+
"MIT",
3+
"Apache-2.0",
4+
"Unicode-3.0"
5+
]
6+
7+
targets = [
8+
"x86_64-pc-windows-msvc",
9+
"x86_64-apple-darwin",
10+
"aarch64-apple-darwin",
11+
]
12+
13+
private = { ignore = true }
14+
ignore-build-dependencies = true
15+
ignore-dev-dependencies = true

livemeta/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
name = "livemeta"
33
version = "0.1.0"
44
edition = "2024"
5+
license = "MIT"
6+
publish = false
57

68
[dependencies]
79
thiserror = "2.0.12"

0 commit comments

Comments
 (0)