You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/workflows/publish.yml
+15-9Lines changed: 15 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,6 @@
1
-
# This workflow will upload a Python Package using Twine when a release is created
1
+
# This workflow will upload a Python Package using Trusted Publishers automatically when a release is created
2
2
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
3
+
# and https://docs.pypi.org/trusted-publishers/using-a-publisher/.
3
4
4
5
name: Upload Python Package
5
6
@@ -8,14 +9,22 @@ on:
8
9
types: [created]
9
10
10
11
jobs:
11
-
deploy:
12
-
12
+
pypi-publish:
13
13
runs-on: ubuntu-latest
14
+
15
+
environment:
16
+
name: pypi
17
+
url: https://pypi.org/project/tldr/
18
+
19
+
permissions:
20
+
contents: read
21
+
id-token: write # Required for accessing OpenID Connect (OIDC) token for PyPI trusted publisher
Cache is downloaded from `TLDR_DOWNLOAD_CACHE_LOCATION` (defaults to the one described in [the client specification](https://github.com/tldr-pages/tldr/blob/main/CLIENT-SPECIFICATION.md#caching)), unzipped and extracted into the [local cache directory](#cache-location). Pages are loaded directly from `TLDR_PAGES_SOURCE_LOCATION` if `tldr <command>` is used.
95
97
96
98
-`TLDR_CACHE_ENABLED` (default is `1`):
97
-
- If set to `1`, the client will first try to load from cache, and fall back to fetching from the internet if the cache doesn't exist or is too old.
98
-
- If set to `0`, the client will fetch from the internet, and fall back to the cache if the page cannot be fetched from the internet.
99
+
- If set to `1`, the client will first try to load from cache, and fall back to fetching from the internet if the cache doesn't exist or is too old.
100
+
- If set to `0`, the client will fetch from the internet, and fall back to the cache if the page cannot be fetched from the internet.
99
101
-`TLDR_CACHE_MAX_AGE` (default is `168` hours, which is equivalent to a week): maximum age of the cache in hours to be considered as valid when `TLDR_CACHE_ENABLED` is set to `1`.
100
102
101
103
#### Cache location
102
104
103
105
In order of precedence:
106
+
104
107
-`$XDG_CACHE_HOME/tldr`
105
108
-`$HOME/.cache/tldr`
106
109
-`~/.cache/tldr`
@@ -135,10 +138,14 @@ an autocomplete for `tldr` for `fish`.
135
138
136
139
For networks that sit behind a proxy, it may be necessary to disable SSL verification for the client to function. Setting the following:
137
140
138
-
-`TLDR_ALLOW_INSECURE=1`
141
+
-`TLDR_ALLOW_INSECURE=1`
139
142
140
143
will disable SSL certificate inspection. This __should be avoided__ unless absolutely necessary.
141
144
145
+
Alternatively, It is possible to use a different certificate store/bundle by setting:
146
+
147
+
*`TLDR_CERT=/path/to/certificates.crt`
148
+
142
149
### Colors
143
150
144
151
Values of the `TLDR_COLOR_x` variables may consist of three parts:
@@ -183,3 +190,7 @@ can either use the `--source` flag when using tldr or by specifying the followin
183
190
- it can also point to a local directory using `file:///path/to/directory`.
184
191
-`TLDR_DOWNLOAD_CACHE_LOCATION` to control where to pull a zip of all pages from.
185
192
- defaults to `https://github.com/tldr-pages/tldr/releases/latest/download/tldr.zip`.
193
+
194
+
### Command options
195
+
196
+
Pages might contain `{{[*|*]}}` patterns to let the client decide whether to show shortform or longform versions of options. This can be configured with `TLDR_OPTIONS`, which accepts values `short`, `long` and `both`
0 commit comments