Add tea token fetching instructions to RELEASING.md
This commit is contained in:
+28
-10
@@ -14,7 +14,8 @@ local `DLL_README.md`). This must be set up once when creating the repo:
|
|||||||
tea repo create --name WeirdUtils --description "Vanilla WoW 1.12.1 utility DLLs" --login MarcelineVQ
|
tea repo create --name WeirdUtils --description "Vanilla WoW 1.12.1 utility DLLs" --login MarcelineVQ
|
||||||
```
|
```
|
||||||
|
|
||||||
Codeberg disables releases on new repos by default. Enable via API:
|
Codeberg disables releases on new repos by default. Enable via API
|
||||||
|
(get your token from `grep 'token:' ~/.config/tea/config.yml | head -1 | awk '{print $2}'`):
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
curl -s -X PATCH \
|
curl -s -X PATCH \
|
||||||
@@ -139,9 +140,9 @@ asset upload in one command. The tag is created on the remote automatically.
|
|||||||
Run from a clone of the remote repo, or specify `--repo` explicitly.
|
Run from a clone of the remote repo, or specify `--repo` explicitly.
|
||||||
Only attach the combined DLL and the variant DLLs for modules in this release.
|
Only attach the combined DLL and the variant DLLs for modules in this release.
|
||||||
|
|
||||||
Also include a release-specific copy of `include/weirdutils_api.h` with the
|
Only attach DLLs to the release - do NOT attach `weirdutils_api.h` as a
|
||||||
DLL names list trimmed to only released modules. Non-released DLL names must
|
release asset. The header belongs in the repo itself (pushed to `main`),
|
||||||
NOT appear in the header.
|
not in the release downloads.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
# Example: transmogfix + customassets + healtextfix release
|
# Example: transmogfix + customassets + healtextfix release
|
||||||
@@ -157,19 +158,27 @@ tea release create \
|
|||||||
--asset zig-out/variants/healtextfix.dll
|
--asset zig-out/variants/healtextfix.dll
|
||||||
```
|
```
|
||||||
|
|
||||||
Upload the header separately via API after creating the release:
|
### Replacing a DLL on an existing release
|
||||||
|
|
||||||
|
Delete the old asset by name, then upload the new one:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
curl -s -X POST \
|
tea release assets delete --repo MarcelineVQ/WeirdUtils -y v0.4.0 minimapicons.dll
|
||||||
-H "Authorization: token <your-token>" \
|
tea release assets create --repo MarcelineVQ/WeirdUtils v0.4.0 zig-out/variants/minimapicons.dll
|
||||||
-F "attachment=@/path/to/weirdutils_api.h" \
|
|
||||||
"https://codeberg.org/api/v1/repos/MarcelineVQ/WeirdUtils/releases/<release-id>/assets"
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## 5. Hide source archives
|
## 5. Hide source archives
|
||||||
|
|
||||||
Codeberg attaches empty source tar/zip by default. Hide them via API:
|
Codeberg attaches empty source tar/zip by default. Hide them via API:
|
||||||
|
|
||||||
|
Get your token from the tea config:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
grep 'token:' ~/.config/tea/config.yml | head -1 | awk '{print $2}'
|
||||||
|
```
|
||||||
|
|
||||||
|
Then hide the archives:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
curl -s -X PATCH \
|
curl -s -X PATCH \
|
||||||
-H "Authorization: token <your-token>" \
|
-H "Authorization: token <your-token>" \
|
||||||
@@ -178,7 +187,16 @@ curl -s -X PATCH \
|
|||||||
"https://codeberg.org/api/v1/repos/MarcelineVQ/WeirdUtils/releases/<release-id>"
|
"https://codeberg.org/api/v1/repos/MarcelineVQ/WeirdUtils/releases/<release-id>"
|
||||||
```
|
```
|
||||||
|
|
||||||
Get the release ID from `tea release list --repo MarcelineVQ/WeirdUtils --output json`.
|
Get the release ID using the API (not `tea release list --output json`, which
|
||||||
|
mangles keys like `tag-_name`):
|
||||||
|
|
||||||
|
```sh
|
||||||
|
tea api repos/MarcelineVQ/WeirdUtils/releases | python3 -c "
|
||||||
|
import sys,json; releases=json.load(sys.stdin)
|
||||||
|
r=[x for x in releases if x['tag_name']=='vX.Y.Z']
|
||||||
|
print(r[0]['id']) if r else print('not found')
|
||||||
|
"
|
||||||
|
```
|
||||||
|
|
||||||
## Checklist
|
## Checklist
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user