From afa723300a7f1a183cf2342669f00da29c1d879d Mon Sep 17 00:00:00 2001 From: Nick Mello Date: Thu, 14 Aug 2025 22:07:06 -0500 Subject: [PATCH] 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 --- .github/workflows/bundle.yml | 38 ++++++++++++++++++++++++++++++++++++ manager | 4 +++- 2 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/bundle.yml diff --git a/.github/workflows/bundle.yml b/.github/workflows/bundle.yml new file mode 100644 index 0000000..1e12857 --- /dev/null +++ b/.github/workflows/bundle.yml @@ -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" diff --git a/manager b/manager index 8744b98..3bca8c6 100755 --- a/manager +++ b/manager @@ -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)