|
32 | 32 | - name: Get README files |
33 | 33 | run: uv run get-readme |
34 | 34 |
|
35 | | - - name: Consolidate plugins |
36 | | - run: uv run consolidate-plugins |
37 | | - |
38 | | - - name: Consolidate READMEs |
39 | | - run: uv run consolidate-readmes |
40 | | - |
41 | 35 | - name: Check for changes |
42 | 36 | id: git-check |
43 | 37 | run: | |
|
55 | 49 | - name: No changes detected |
56 | 50 | if: steps.git-check.outputs.has_changes != 'true' |
57 | 51 | run: echo "No changes to commit" |
58 | | - |
59 | | - create-release: |
60 | | - # Only run after update-data job completes successfully |
61 | | - needs: update-data |
62 | | - runs-on: ubuntu-latest |
63 | | - permissions: |
64 | | - contents: write |
65 | | - |
66 | | - steps: |
67 | | - - name: Checkout repository |
68 | | - uses: actions/checkout@v5 |
69 | | - with: |
70 | | - ref: main |
71 | | - |
72 | | - - name: Generate release tag |
73 | | - id: tag |
74 | | - run: | |
75 | | - # Generate CalVer format: YY.MM.DD |
76 | | - CALVER=$(date +'%y.%m.%d') |
77 | | -
|
78 | | - # Check if a release with this CalVer already exists |
79 | | - COUNTER=0 |
80 | | - TAG="$CALVER" |
81 | | -
|
82 | | - # Fetch existing tags |
83 | | - git fetch --tags |
84 | | -
|
85 | | - # Find the highest counter for today's releases |
86 | | - while git rev-parse "refs/tags/$TAG" >/dev/null 2>&1; do |
87 | | - COUNTER=$((COUNTER + 1)) |
88 | | - TAG="$CALVER.$COUNTER" |
89 | | - done |
90 | | -
|
91 | | - echo "tag=$TAG" >> $GITHUB_OUTPUT |
92 | | - echo "Generated tag: $TAG" |
93 | | -
|
94 | | - - name: Create zip archives |
95 | | - run: | |
96 | | - zip -r plugins.zip plugins/ |
97 | | - zip -r readmes.zip readmes/ |
98 | | - zip -r plugins-and-readmes.zip plugins/ readmes/ output/ |
99 | | -
|
100 | | - - name: Create Release |
101 | | - uses: softprops/action-gh-release@v2 |
102 | | - with: |
103 | | - tag_name: ${{ steps.tag.outputs.tag }} |
104 | | - name: Release ${{ steps.tag.outputs.tag }} |
105 | | - body: | |
106 | | - Automatic release created from PR merge |
107 | | -
|
108 | | - **PR**: #${{ github.event.pull_request.number }} - ${{ github.event.pull_request.title }} |
109 | | - **Merged by**: @${{ github.event.pull_request.merged_by.login }} |
110 | | - **Commit**: ${{ github.sha }} |
111 | | - files: | |
112 | | - plugins.zip |
113 | | - readmes.zip |
114 | | - plugins-and-readmes.zip |
115 | | - output/plugins.yml |
116 | | - output/readmes.json |
117 | | - draft: false |
118 | | - prerelease: false |
0 commit comments