Files
awesome-copilot/.github/workflows/publish.yml
Aaron Powell 87fb17b7d9 chore: remove materialized plugin files from tracking
These agents/, commands/, and skills/ directories inside plugin folders
are generated by eng/materialize-plugins.mjs during CI publish and
should not be committed to the staged branch.

- Remove 185 materialized files from git tracking
- Add .gitignore rules to prevent accidental re-commits
- Update publish.yml to force-add materialized files despite .gitignore

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-20 15:43:09 +11:00

55 lines
1.4 KiB
YAML

name: Publish to main
on:
push:
branches: [staged]
concurrency:
group: publish-to-main
cancel-in-progress: true
permissions:
contents: write
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout staged branch
uses: actions/checkout@v4
with:
ref: staged
fetch-depth: 0
- name: Extract Node version from package.json
id: node-version
run: |
NODE_VERSION=$(jq -r '.engines.node // "22"' package.json)
echo "version=${NODE_VERSION}" >> "$GITHUB_OUTPUT"
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ steps.node-version.outputs.version }}
- name: Install dependencies
run: npm ci
- name: Materialize plugin files
run: node eng/materialize-plugins.mjs
- name: Build generated files
run: npm run build
- name: Fix line endings
run: bash scripts/fix-line-endings.sh
- name: Publish to main
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add -A
git add -f plugins/*/agents/ plugins/*/commands/ plugins/*/skills/
git commit -m "chore: publish from staged [skip ci]" --allow-empty
git push origin HEAD:main --force