@@ -10,21 +10,23 @@ jobs:
1010 name : Update version
1111 runs-on : ubuntu-latest
1212 timeout-minutes : 10
13+ permissions :
14+ contents : write
1315
1416 steps :
1517 - name : Check out repository
16- uses : actions/checkout@v4
18+ uses : actions/checkout@v6
1719 with :
1820 fetch-depth : 0 # Fetch all history so we can access tags and commits
1921 fetch-tags : true # Ensure tags are fetched
2022
2123 - name : Install pnpm
22- uses : pnpm/action-setup@v4
24+ uses : pnpm/action-setup@v5
2325 with :
2426 version : 10
2527
2628 - name : Install Node.js LTS
27- uses : actions/setup-node@v4
29+ uses : actions/setup-node@v6
2830 with :
2931 node-version : lts/*
3032 cache : " pnpm"
4143 php-version : " latest"
4244
4345 - name : Install Composer
44- uses : ramsey/composer-install@v3
46+ uses : ramsey/composer-install@v4
4547
4648 - name : Downgrade PHP code to the minimum version WordPress requires
4749 run : vendor/bin/rector --ansi
6971 # Push changes, handling potential conflicts
7072 git push || git pull --rebase origin ${{ github.ref_name }} && git push
7173
72- - name : Create release
73- id : release
74- if : steps.script.outputs.has-changed == 'true'
75- uses : actions/create-release@v1
76- env :
77- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
78- with :
79- tag_name : ${{ steps.script.outputs.stable-tag }}
80- release_name : ${{ steps.script.outputs.release-name }}
81- body : ${{ steps.script.outputs.release-body }}
82- draft : false
83- prerelease : false
84-
8574 - name : WordPress Plugin Deploy
8675 if : steps.script.outputs.has-changed == 'true'
8776 id : deploy
@@ -95,13 +84,20 @@ jobs:
9584 VERSION : ${{ steps.script.outputs.stable-tag }}
9685 ASSETS_DIR : assets
9786
98- - name : Upload release asset
87+ - name : Name release zip like repository
9988 if : steps.script.outputs.has-changed == 'true'
100- uses : actions/upload-release-asset@v1.0.2
101- env :
102- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
89+ id : release_zip
90+ run : |
91+ cp "${{ steps.deploy.outputs.zip-path }}" "${{ github.workspace }}/${{ github.event.repository.name }}.zip"
92+ echo "path=${{ github.workspace }}/${{ github.event.repository.name }}.zip" >> "$GITHUB_OUTPUT"
93+
94+ - name : Create GitHub release
95+ if : steps.script.outputs.has-changed == 'true'
96+ uses : softprops/action-gh-release@v2
10397 with :
104- upload_url : ${{ steps.release.outputs.upload_url }}
105- asset_path : ${{ steps.deploy.outputs.zip-path }}
106- asset_name : ${{ github.event.repository.name }}.zip
107- asset_content_type : application/zip
98+ tag_name : ${{ steps.script.outputs.stable-tag }}
99+ name : ${{ steps.script.outputs.release-name }}
100+ body : ${{ steps.script.outputs.release-body }}
101+ draft : false
102+ prerelease : false
103+ files : ${{ steps.release_zip.outputs.path }}
0 commit comments