fix(ci): use bash expansion for version extraction #18
Workflow file for this run
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: Release | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| permissions: | |
| contents: write | |
| jobs: | |
| release: | |
| name: Create Release | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Harden Runner | |
| uses: step-security/harden-runner@5ef0c079ce82195b2a36a210272d6b661572d83e # v2.14.2 | |
| with: | |
| egress-policy: audit | |
| - name: Checkout | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Get version from tag | |
| id: version | |
| run: echo "version=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT | |
| - name: Create github-project skill package | |
| run: | | |
| mkdir -p dist-skill | |
| cp skills/github-project/SKILL.md dist-skill/ | |
| cp LICENSE dist-skill/ | |
| [ -d "skills/github-project/references" ] && cp -r skills/github-project/references dist-skill/ | |
| [ -d "skills/github-project/scripts" ] && cp -r skills/github-project/scripts dist-skill/ | |
| [ -d "skills/github-project/assets" ] && cp -r skills/github-project/assets dist-skill/ | |
| [ -d "skills/github-project/templates" ] && cp -r skills/github-project/templates dist-skill/ | |
| [ -d "skills/github-project/examples" ] && cp -r skills/github-project/examples dist-skill/ | |
| [ -f "skills/github-project/checkpoints.yaml" ] && cp skills/github-project/checkpoints.yaml dist-skill/ | |
| cd dist-skill | |
| zip -r ../github-project-skill-${{ steps.version.outputs.version }}.zip . | |
| tar -czvf ../github-project-skill-${{ steps.version.outputs.version }}.tar.gz . | |
| - name: Create github-project plugin package | |
| run: | | |
| mkdir -p dist-plugin | |
| # Include github-project skill files | |
| mkdir -p dist-plugin/skills/github-project | |
| cp skills/github-project/SKILL.md dist-plugin/skills/github-project/ | |
| [ -d "skills/github-project/references" ] && cp -r skills/github-project/references dist-plugin/skills/github-project/ | |
| [ -d "skills/github-project/scripts" ] && cp -r skills/github-project/scripts dist-plugin/skills/github-project/ | |
| [ -d "skills/github-project/assets" ] && cp -r skills/github-project/assets dist-plugin/skills/github-project/ | |
| [ -d "skills/github-project/templates" ] && cp -r skills/github-project/templates dist-plugin/skills/github-project/ | |
| [ -d "skills/github-project/examples" ] && cp -r skills/github-project/examples dist-plugin/skills/github-project/ | |
| [ -f "skills/github-project/checkpoints.yaml" ] && cp skills/github-project/checkpoints.yaml dist-plugin/skills/github-project/ | |
| cp LICENSE dist-plugin/ | |
| # Include plugin manifest | |
| [ -d ".claude-plugin" ] && cp -r .claude-plugin dist-plugin/ | |
| cd dist-plugin | |
| zip -r ../github-project-plugin-${{ steps.version.outputs.version }}.zip . | |
| tar -czvf ../github-project-plugin-${{ steps.version.outputs.version }}.tar.gz . | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@a06a81a03ee405af7f2048a818ed3f03bbf83c7b # v2.5.0 | |
| with: | |
| files: | | |
| github-project-skill-${{ steps.version.outputs.version }}.zip | |
| github-project-skill-${{ steps.version.outputs.version }}.tar.gz | |
| github-project-plugin-${{ steps.version.outputs.version }}.zip | |
| github-project-plugin-${{ steps.version.outputs.version }}.tar.gz | |
| generate_release_notes: true | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |