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)