From 12a6f39f360d2e059c9d14f71619bd2f2bbc6fa2 Mon Sep 17 00:00:00 2001 From: irkode Date: Tue, 20 Aug 2024 09:27:25 +0200 Subject: [PATCH] tag oldest release --- .github/workflows/build.yml | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 10660d9..9844dc3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -60,17 +60,18 @@ jobs: } | Sort-Object -Property release Write-Output "All BULMA Releases" $BulmaReleases | FT | Out-Host - if ($false) { - Write-Output "Downloading Bulma $($BulmaRelease.version)" - Invoke-WebRequest -Uri $BulmaRelease.download -OutFile $BulmaRelease.archive - $bulmaFolder = (Get-Item $BulmaRelease.archive).Basename + $BulmaRelease = $BulmaReleases | Where-Object { -Not $_.known } | Select-Object -First 1 + if ($BulmaRelease) { + Write-Output "Downloading Bulma $($BulmaRelease.release)" + #Invoke-WebRequest -Uri $BulmaRelease.download -OutFile $BulmaRelease.archive + #$bulmaFolder = (Get-Item $BulmaRelease.archive).Basename - [void](New-Item -Type Directory ./assets -ErrorAction Stop) - if (-Not (Test-Path .\assets -PathType Container)) { throw "missing folder: assets"} - Expand-Archive -LiteralPath $BulmaRelease.archive -DestinationPath .\assets - if (Test-Path .\assets\__MACOSX) { Remove-Item .\assets\__MACOSX -ErrorAction SilentlyContinue -Recurse } - Rename-Item .\assets\$bulmaFolder "bulma" - if (-Not (Test-Path ./assets/bulma -PathType Container)) { throw "missing folder: assets/bulma folder"} + #[void](New-Item -Type Directory ./assets -ErrorAction Stop) + #if (-Not (Test-Path .\assets -PathType Container)) { throw "missing folder: assets"} + #Expand-Archive -LiteralPath $BulmaRelease.archive -DestinationPath .\assets + #if (Test-Path .\assets\__MACOSX) { Remove-Item .\assets\__MACOSX -ErrorAction SilentlyContinue -Recurse } + #Rename-Item .\assets\$bulmaFolder "bulma" + #if (-Not (Test-Path ./assets/bulma -PathType Container)) { throw "missing folder: assets/bulma folder"} echo "BULMA_VERSION=$($BulmaRelease.version)" | Out-File $Env:GITHUB_ENV -Append -Encoding utf8 echo "BULMA_ARCHIVE=$($BulmaRelease.archive)" | Out-File $Env:GITHUB_ENV -Append -Encoding utf8 Write-Output "download successful: $($BulmaRelease.archive)" @@ -82,14 +83,14 @@ jobs: if: ${{ env.BULMA_VERSION != 'NONE' }} run: | Write-Host "Creating Release for $ENV:BULMA_VERSION" - #$BulmaVersion = "$ENV:BULMA_VERSION" + $BulmaVersion = "$ENV:BULMA_VERSION" #$BulmaArchive = "$ENV:BULMA_ARCHIVE" #git checkout -b "bulma-$BulmaVersion" #Remove-Item $BulmaArchive -ErrorAction SilentlyContinue #if (Test-Path $BulmaArchive { throw "failed to remove downloaded archive: $BulmaArchive" } #git add . #git commit -m "add Bulma v$BulmaVersion" - #git tag -a "v$BulmaVersion" -m "packed Bulma release v$BulmaVersion" - #git push --tags + git tag -a "$BulmaVersion" -m "packed Bulma release $BulmaVersion" + git push --tags #git checkout main #git branch -D "bulma-$BulmaVersion"