From 28d8b4ac99cc483e982acfb05f73c5a9a251742d Mon Sep 17 00:00:00 2001 From: irkode Date: Tue, 20 Aug 2024 11:56:53 +0200 Subject: [PATCH] add branch and tag --- .github/workflows/build.yml | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6416392..b2d36d2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -71,7 +71,11 @@ jobs: [void](Test-Path .\assets -PathType Container -ErrorAction Stop) 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 ((Get-ChildItem .\assets).Count -ne 1) { + Write-Error "Unknown Bulma archive content found (expected 'bulma' only):" + Get-ChildItem .\assets | Out-Host + Write-Error "Aborting - please check" + } [void](Test-Path ./assets/bulma -PathType Container -ErrorAction Stop) echo "BULMA_RELEASE=$($BulmaRelease.release)" | Out-File $Env:GITHUB_ENV -Append -Encoding utf8 echo "BULMA_ARCHIVE=$($BulmaRelease.archive)" | Out-File $Env:GITHUB_ENV -Append -Encoding utf8 @@ -87,12 +91,11 @@ jobs: $BulmaArchive = "$ENV:BULMA_ARCHIVE" $cwd = ($pwd.Path -replace "\\","\\") + "\\" (Get-ChildItem . -recurse).FullName -replace $cwd, ""|sort - #git checkout -b "bulma-$BulmaRelease" - #Remove-Item $BulmaArchive -ErrorAction SilentlyContinue - #if (Test-Path $BulmaArchive { throw "failed to remove downloaded archive: $BulmaArchive" } - #git add . - #git commit -m "add Bulma $BulmaRelease" + git checkout -b "bulma-$BulmaRelease" + git add assets .github + git commit -m "add Bulma $BulmaRelease" + git push git tag -a "$BulmaRelease" -m "packed Bulma release $BulmaRelease" git push --tags - #git checkout main - #git branch -D "bulma-$BulmaRelease" + git checkout main + git branch -D "bulma-$BulmaRelease"