|
5 | 5 | tags: |
6 | 6 | - 'v*' |
7 | 7 |
|
8 | | -permissions: |
9 | | - contents: write |
10 | | - |
11 | 8 | jobs: |
12 | 9 | release: |
13 | | - name: Create Release |
14 | | - runs-on: ubuntu-latest |
15 | | - |
16 | | - steps: |
17 | | - - name: Harden Runner |
18 | | - uses: step-security/harden-runner@5ef0c079ce82195b2a36a210272d6b661572d83e # v2.14.2 |
19 | | - with: |
20 | | - egress-policy: audit |
21 | | - |
22 | | - - name: Checkout |
23 | | - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
24 | | - |
25 | | - - name: Validate plugin.json matches tag |
26 | | - env: |
27 | | - TAG_VERSION: ${{ github.ref_name }} |
28 | | - run: | |
29 | | - PLUGIN_VERSION=$(python3 -c "import json; print(json.load(open('.claude-plugin/plugin.json'))['version'])") |
30 | | - TAG_BARE="${TAG_VERSION#v}" |
31 | | - if [[ "${TAG_BARE}" != "${PLUGIN_VERSION}" ]]; then |
32 | | - echo "::error file=.claude-plugin/plugin.json::Tag ${TAG_VERSION} does not match plugin.json version ${PLUGIN_VERSION}" |
33 | | - exit 1 |
34 | | - fi |
35 | | - echo "Version validated: ${TAG_VERSION} matches plugin.json ${PLUGIN_VERSION}" |
36 | | -
|
37 | | - - name: Get version from tag |
38 | | - id: version |
39 | | - run: echo "version=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT |
40 | | - |
41 | | - - name: Create typo3-ddev skill package |
42 | | - run: | |
43 | | - mkdir -p dist-skill |
44 | | - cp skills/typo3-ddev/SKILL.md dist-skill/ |
45 | | - cp LICENSE dist-skill/ |
46 | | - [ -d "skills/typo3-ddev/references" ] && cp -r skills/typo3-ddev/references dist-skill/ |
47 | | - [ -d "skills/typo3-ddev/scripts" ] && cp -r skills/typo3-ddev/scripts dist-skill/ |
48 | | - [ -d "skills/typo3-ddev/assets" ] && cp -r skills/typo3-ddev/assets dist-skill/ |
49 | | - [ -d "skills/typo3-ddev/templates" ] && cp -r skills/typo3-ddev/templates dist-skill/ |
50 | | - [ -d "skills/typo3-ddev/examples" ] && cp -r skills/typo3-ddev/examples dist-skill/ |
51 | | - [ -f "skills/typo3-ddev/checkpoints.yaml" ] && cp skills/typo3-ddev/checkpoints.yaml dist-skill/ |
52 | | - cd dist-skill |
53 | | - zip -r ../typo3-ddev-skill-${{ steps.version.outputs.version }}.zip . |
54 | | - tar -czvf ../typo3-ddev-skill-${{ steps.version.outputs.version }}.tar.gz . |
55 | | -
|
56 | | - - name: Create typo3-ddev plugin package |
57 | | - run: | |
58 | | - mkdir -p dist-plugin |
59 | | - # Include typo3-ddev skill files |
60 | | - mkdir -p dist-plugin/skills/typo3-ddev |
61 | | - cp skills/typo3-ddev/SKILL.md dist-plugin/skills/typo3-ddev/ |
62 | | - [ -d "skills/typo3-ddev/references" ] && cp -r skills/typo3-ddev/references dist-plugin/skills/typo3-ddev/ |
63 | | - [ -d "skills/typo3-ddev/scripts" ] && cp -r skills/typo3-ddev/scripts dist-plugin/skills/typo3-ddev/ |
64 | | - [ -d "skills/typo3-ddev/assets" ] && cp -r skills/typo3-ddev/assets dist-plugin/skills/typo3-ddev/ |
65 | | - [ -d "skills/typo3-ddev/templates" ] && cp -r skills/typo3-ddev/templates dist-plugin/skills/typo3-ddev/ |
66 | | - [ -d "skills/typo3-ddev/examples" ] && cp -r skills/typo3-ddev/examples dist-plugin/skills/typo3-ddev/ |
67 | | - [ -f "skills/typo3-ddev/checkpoints.yaml" ] && cp skills/typo3-ddev/checkpoints.yaml dist-plugin/skills/typo3-ddev/ |
68 | | - cp LICENSE dist-plugin/ |
69 | | - # Include plugin manifest |
70 | | - [ -d ".claude-plugin" ] && cp -r .claude-plugin dist-plugin/ |
71 | | - cd dist-plugin |
72 | | - zip -r ../typo3-ddev-plugin-${{ steps.version.outputs.version }}.zip . |
73 | | - tar -czvf ../typo3-ddev-plugin-${{ steps.version.outputs.version }}.tar.gz . |
74 | | -
|
75 | | - - name: Create GitHub Release |
76 | | - uses: softprops/action-gh-release@a06a81a03ee405af7f2048a818ed3f03bbf83c7b # v2.5.0 |
77 | | - with: |
78 | | - files: | |
79 | | - typo3-ddev-skill-${{ steps.version.outputs.version }}.zip |
80 | | - typo3-ddev-skill-${{ steps.version.outputs.version }}.tar.gz |
81 | | - typo3-ddev-plugin-${{ steps.version.outputs.version }}.zip |
82 | | - typo3-ddev-plugin-${{ steps.version.outputs.version }}.tar.gz |
83 | | - generate_release_notes: true |
84 | | - env: |
85 | | - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 10 | + uses: netresearch/skill-repo-skill/.github/workflows/release.yml@main |
| 11 | + permissions: |
| 12 | + contents: write |
0 commit comments