File tree Expand file tree Collapse file tree 4 files changed +13
-13
lines changed
Expand file tree Collapse file tree 4 files changed +13
-13
lines changed Original file line number Diff line number Diff line change 1- name : End-to-end release test
1+ name : After release test
22on :
3- push :
4- branches :
5- - main
6- paths-ignore :
7- - ' **.md'
8- schedule :
9- - cron : ' 25 08 * * *'
3+ release :
4+ types : [ published ]
105 workflow_dispatch :
116 inputs :
127 debug_enabled :
4843 env :
4944 EXTENSION_NAME : " CrowdSec_Bouncer"
5045 EXTENSION_PATH : " crowdsec-bouncer"
51- ORIGIN : " https://github.com/crowdsecurity/cs-wordpress-bouncer"
5246
5347 steps :
5448
@@ -112,16 +106,16 @@ jobs:
112106 path : my-own-modules/${{ env.EXTENSION_PATH }}
113107
114108 - name : Copy only expected zipped files from HEAD
115- if : github.event_name == 'push' || github. event.inputs.check_head_zip == 'true'
109+ if : github.event.inputs.check_head_zip == 'true'
116110 run : |
117111 mkdir wp-content/plugins/crowdsec
118112 rsync -rc --exclude-from="my-own-modules/${{ env.EXTENSION_PATH }}/.distignore" "my-own-modules/${{ env.EXTENSION_PATH }}/" wp-content/plugins/crowdsec/ --delete --delete-excluded
119113 ls -al wp-content/plugins/crowdsec
120114
121115 - name : Retrieve last stable release zip
122- if : github.event_name != 'push' && github. event.inputs.check_head_zip != 'true'
116+ if : github.event.inputs.check_head_zip != 'true'
123117 run : |
124- LAST_TAG=$(curl -Ls -o /dev/null -w %{url_effective} ${{ env.ORIGIN }} /releases/latest | grep -oP "\/tag\/v\K(.*)$")
118+ LAST_TAG=$(curl -Ls -o /dev/null -w %{url_effective} $GITHUB_SERVER_URL/$GITHUB_REPOSITORY /releases/latest | grep -oP "\/tag\/v\K(.*)$")
125119 curl -fL https://downloads.wordpress.org/plugin/crowdsec.$LAST_TAG.zip -o crowdsec.$LAST_TAG.zip
126120 unzip crowdsec.$LAST_TAG.zip -d ${{ github.workspace }}/wp-content/plugins
127121
Original file line number Diff line number Diff line change 11name : End-to-end test suite
22on :
3+ push :
4+ branches :
5+ - main
6+ paths-ignore :
7+ - ' **.md'
38 workflow_dispatch :
49
510permissions :
Original file line number Diff line number Diff line change @@ -141,6 +141,7 @@ jobs:
141141 if : github.event.inputs.deploy_to_wordpress == 'true'
142142 uses : softprops/action-gh-release@v1
143143 with :
144+ token : ${{ secrets.CS_RELEASE_TOKEN }}
144145 files : crowdsec.zip
145146 body_path : CHANGELOG.txt
146147 name : ${{ env.VERSION_NUMBER }}
Original file line number Diff line number Diff line change 55This WordPress plugin allows you to apply decisions from CrowdSec directly within the WordPress application.
66
77![ Version] ( https://img.shields.io/github/v/release/crowdsecurity/cs-wordpress-bouncer?include_prereleases )
8- [ ![ End-to-end release ZIP test] ( https://github.com/crowdsecurity/cs-wordpress-bouncer/actions/workflows/end-to-end-release-zip .yml/badge.svg )] ( https://github.com/crowdsecurity/cs-wordpress-bouncer/actions/workflows/end-to-end-release-zip .yml )
8+ [ ![ End-to-end test] ( https://github.com/crowdsecurity/cs-wordpress-bouncer/actions/workflows/end-to-end-test-suite .yml/badge.svg )] ( https://github.com/crowdsecurity/cs-wordpress-bouncer/actions/workflows/end-to-end-test-suite .yml )
99![ Licence] ( https://img.shields.io/github/license/crowdsecurity/cs-wordpress-bouncer )
1010
1111
You can’t perform that action at this time.
0 commit comments