Skip to content

Commit c2e58de

Browse files
committed
Add builds to GitHub releases
1 parent 429d3ed commit c2e58de

File tree

4 files changed

+39
-10
lines changed

4 files changed

+39
-10
lines changed

.github/workflows/php80.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,3 +127,17 @@ jobs:
127127
curl --user "$BINTRAY_USER":"$BINTRAY_KEY" -T "$file" https://api.bintray.com/content/"$BINTRAY_USER"/"$BINTRAY_REPO"/"$VERSION"-windows/$VERSION/"$file" || true
128128
done
129129
curl --user "$BINTRAY_USER":"$BINTRAY_KEY" -X POST https://api.bintray.com/content/"$BINTRAY_USER"/"$BINTRAY_REPO"/"$VERSION"-windows/"$VERSION"/publish || true
130+
- name: Update release
131+
run: |
132+
set -x
133+
curl -sLO http://dl.bintray.com/shivammathur/php/Get-PhpNightly.ps1
134+
assets=()
135+
for asset in ./uploads/*; do
136+
assets+=("-a" "$asset")
137+
done
138+
assets+=("-a" "./Get-PhpNightly.ps1")
139+
git push -f origin :php8.0 || true
140+
hub release delete "php8.0" || true
141+
hub release create "${assets[@]}" -m "php8.0" "php8.0"
142+
env:
143+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/phpmaster.yml

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -129,10 +129,26 @@ jobs:
129129
for file in ./builds/*/*; do
130130
mv $file ./uploads/
131131
done
132-
cd uploads || exit
133-
rm -rf *-src-*.zip || true
134-
for file in ./*; do
135-
curl --user "$BINTRAY_USER":"$BINTRAY_KEY" -X DELETE https://api.bintray.com/content/"$BINTRAY_USER"/"$BINTRAY_REPO"/"$file" || true
136-
curl --user "$BINTRAY_USER":"$BINTRAY_KEY" -T "$file" https://api.bintray.com/content/"$BINTRAY_USER"/"$BINTRAY_REPO"/"$VERSION"-windows/$VERSION/"$file" || true
132+
(
133+
cd uploads || exit
134+
rm -rf *-src-*.zip || true
135+
for file in ./*; do
136+
curl --user "$BINTRAY_USER":"$BINTRAY_KEY" -X DELETE https://api.bintray.com/content/"$BINTRAY_USER"/"$BINTRAY_REPO"/"$file" || true
137+
curl --user "$BINTRAY_USER":"$BINTRAY_KEY" -T "$file" https://api.bintray.com/content/"$BINTRAY_USER"/"$BINTRAY_REPO"/"$VERSION"-windows/$VERSION/"$file" || true
138+
done
139+
curl --user "$BINTRAY_USER":"$BINTRAY_KEY" -X POST https://api.bintray.com/content/"$BINTRAY_USER"/"$BINTRAY_REPO"/"$VERSION"-windows/"$VERSION"/publish || true
140+
)
141+
- name: Update release
142+
run: |
143+
set -x
144+
curl -sLO http://dl.bintray.com/shivammathur/php/Get-PhpNightly.ps1
145+
assets=()
146+
for asset in ./uploads/*; do
147+
assets+=("-a" "$asset")
137148
done
138-
curl --user "$BINTRAY_USER":"$BINTRAY_KEY" -X POST https://api.bintray.com/content/"$BINTRAY_USER"/"$BINTRAY_REPO"/"$VERSION"-windows/"$VERSION"/publish || true
149+
assets+=("-a" "./Get-PhpNightly.ps1")
150+
git push -f origin :php8.1 || true
151+
hub release delete "php8.1" || true
152+
hub release create "${assets[@]}" -m "php8.1" "php8.1"
153+
env:
154+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
Install-PhpMaster.ps1
2-
Install-PhpNightly.ps1
1+
Get-PhpNightly.ps1

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ $version = '8.1' # Set 8.0 or 8.1
3131
3232
# Install
3333
New-Item -Path C:\tools\php -Type Directory -Force
34-
Invoke-WebRequest -UseBasicParsing -Uri https://dl.bintray.com/shivammathur/php/Install-PhpNightly.ps1 -OutFile $php_dir\Install-PhpNightly.ps1
35-
. $php_dir\Install-PhpNightly.ps1 -Architecture $arch -ThreadSafe $ts -Path $php_dir -Version $version
34+
Invoke-WebRequest -UseBasicParsing -Uri https://github.com/shivammathur/php-extensions-windows/releases/latest/download/Get-PhpNightly.ps1 -OutFile $php_dir\Get-PhpNightly.ps1
35+
. $php_dir\Get-PhpNightly.ps1 -Architecture $arch -ThreadSafe $ts -Path $php_dir -Version $version
3636
3737
# Test
3838
. $php_dir\php -v

0 commit comments

Comments
 (0)