Merge pull request #1 from bcgov/feat/initial-setup #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Publish | |
| # Runs on merge to main. Re-validates every skill, then publishes each CHANGED | |
| # skill as a versioned npm package to GitHub Packages. Versions that are already | |
| # published are skipped, so a merge that doesn't bump a skill's version is a | |
| # no-op for that skill. | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - "skills/**" | |
| permissions: | |
| contents: read | |
| packages: write | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| # Third-party action: pinned to an immutable commit SHA (not a tag) to | |
| # defend against tag-hijack / supply-chain attacks. Bump via Dependabot. | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0 | |
| with: | |
| version: "0.11.19" | |
| enable-cache: true | |
| - name: Re-validate every skill before publishing | |
| run: uv run python scripts/validate_skill.py --all | |
| - name: Set up Node + GitHub Packages registry | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: "24" | |
| registry-url: "https://npm.pkg.github.com" | |
| scope: "@bcgov" | |
| - name: Publish changed skills | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| BEFORE_SHA: ${{ github.event.before }} | |
| HEAD_SHA: ${{ github.sha }} | |
| run: bash .github/scripts/publish-changed-skills.sh |