github: Add workflow to build bundles

Bundles contain an extract script that can be run when unbundled that
puts everything in its place just like an install would do but without
the need for python or the json files.

Signed-off-by: Nicholas Mello <nick@nmello.dev>
This commit is contained in:
2025-08-14 22:07:06 -05:00
parent 7869819571
commit afa723300a
2 changed files with 41 additions and 1 deletions

38
.github/workflows/bundle.yml vendored Normal file
View File

@@ -0,0 +1,38 @@
name: Build Dotfile Bundles
on:
push:
branches:
- master
workflow_dispatch:
jobs:
bundle:
runs-on: ubuntu-latest
steps:
# Step 1: Checkout your repository
- name: Checkout repo
uses: actions/checkout@v3
# Step 2: Set up Python
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.11
# Step 3: Run manager bundle for each tool
- name: Build bundles
run: |
./manager bundle nvim
./manager bundle git
./manager bundle fish
./manager bundle tmux
./manager bundle
# Step 4: Upload bundles as artifacts
- name: Upload bundles
uses: actions/upload-artifact@v4
with:
name: dotfile-bundles
path: "*.tar.gz"

View File

@@ -229,4 +229,6 @@ if __name__ == "__main__":
elif args.action == "clean":
clean(entries)
elif args.action == "bundle":
create_tool_bundle(datetime.now().strftime("%Y-%m-%d-%H-%M"), entries)
tools = "-".join(sorted(list({entry['tool'] for entry in entries})))
bundle_name = f"{datetime.now().strftime('%Y-%m-%d-%H-%M')}-{tools}"
create_tool_bundle(bundle_name, entries)