Skip to content

Commit 45260dd

Browse files
Update GitHub actions to latest major versions (#22) [no ci]
## Summary Closes #21 TSIA ## Security implications - [ ] No security impact - [x] Has security impact - described as: more secure ## Testing In the CI. ## Checklist - [x] Linked to an issue - [x] Tested - [x] Asked for a review --------- Co-authored-by: Adriaan van Rossum <1079135+adriaanvanrossum@users.noreply.github.com>
1 parent fd2b607 commit 45260dd

File tree

2 files changed

+192
-189
lines changed

2 files changed

+192
-189
lines changed

.github/workflows/release.yml

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,31 @@ on:
66
workflow_dispatch: # Allows manual triggering
77

88
jobs:
9+
e2e:
10+
uses: ./.github/workflows/tests.yml
11+
912
update:
1013
name: Update version
14+
needs: e2e
1115
runs-on: ubuntu-latest
1216
timeout-minutes: 10
17+
permissions:
18+
contents: write
1319

1420
steps:
1521
- name: Check out repository
16-
uses: actions/checkout@v4
22+
uses: actions/checkout@v6
1723
with:
1824
fetch-depth: 0 # Fetch all history so we can access tags and commits
1925
fetch-tags: true # Ensure tags are fetched
2026

2127
- name: Install pnpm
22-
uses: pnpm/action-setup@v4
28+
uses: pnpm/action-setup@v5
2329
with:
2430
version: 10
2531

2632
- name: Install Node.js LTS
27-
uses: actions/setup-node@v4
33+
uses: actions/setup-node@v6
2834
with:
2935
node-version: lts/*
3036
cache: "pnpm"
@@ -41,7 +47,7 @@ jobs:
4147
php-version: "latest"
4248

4349
- name: Install Composer
44-
uses: ramsey/composer-install@v3
50+
uses: ramsey/composer-install@v4
4551

4652
- name: Downgrade PHP code to the minimum version WordPress requires
4753
run: vendor/bin/rector --ansi
@@ -69,19 +75,6 @@ jobs:
6975
# Push changes, handling potential conflicts
7076
git push || git pull --rebase origin ${{ github.ref_name }} && git push
7177
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-
8578
- name: WordPress Plugin Deploy
8679
if: steps.script.outputs.has-changed == 'true'
8780
id: deploy
@@ -95,13 +88,20 @@ jobs:
9588
VERSION: ${{ steps.script.outputs.stable-tag }}
9689
ASSETS_DIR: assets
9790

98-
- name: Upload release asset
91+
- name: Name release zip like repository
9992
if: steps.script.outputs.has-changed == 'true'
100-
uses: actions/upload-release-asset@v1.0.2
101-
env:
102-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
93+
id: release_zip
94+
run: |
95+
cp "${{ steps.deploy.outputs.zip-path }}" "${{ github.workspace }}/${{ github.event.repository.name }}.zip"
96+
echo "path=${{ github.workspace }}/${{ github.event.repository.name }}.zip" >> "$GITHUB_OUTPUT"
97+
98+
- name: Create GitHub release
99+
if: steps.script.outputs.has-changed == 'true'
100+
uses: softprops/action-gh-release@v2
103101
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
102+
tag_name: ${{ steps.script.outputs.stable-tag }}
103+
name: ${{ steps.script.outputs.release-name }}
104+
body: ${{ steps.script.outputs.release-body }}
105+
draft: false
106+
prerelease: false
107+
files: ${{ steps.release_zip.outputs.path }}

0 commit comments

Comments
 (0)