Skip to content

Commit

Permalink
fix: pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
kvendingoldo committed Apr 29, 2024
1 parent 8104158 commit 7c4ff58
Showing 1 changed file with 7 additions and 13 deletions.
20 changes: 7 additions & 13 deletions .github/workflows/choco.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@
name: "Chocolatey Release Pipeline"

on:
# release:
# types: [published]
push:
branches:
- 'feat/add-automatic-choco-release'
release:
types: [published]

jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -20,11 +18,10 @@ jobs:

- name: Update chocolatey checksums
run: |
set -x
release_tag=${{ github.event.release.tag_name }}
release_version="${release_tag#v}"
echo "[INFO] Wait until all artefacts will be uploaded"
sleep 300
release_tag="v1.9.0"
release_tag=${{ github.event.release.tag_name }}
release_version="${release_tag#v}"
curl \
Expand All @@ -41,13 +38,10 @@ jobs:
sed -i "s~\$url64 = '.*'~\$url64 = '${choco_url64}'~g" tenv/tools/chocolateyinstall.ps1
sed -i "s~\$checksum = '.*'~\$checksum = '${choco_sum}'~g" tenv/tools/chocolateyinstall.ps1
sed -i "s~\$checksum64 = '.*'~\$checksum64 = '${choco_sum64}'~g" tenv/tools/chocolateyinstall.ps1
cat tenv/tools/chocolateyinstall.ps1
git config user.name tofuutils
git config user.email tofuutils@github.com
git add -A
git commit -m "Chocolatey scripts update for tenv version ${release_tag}"
git tag -a ${release_version} -m "${release_version}
git push origin --tags main
sed -i 's/$url = '\''.*'\''/$url = '\''https://github.com/tofuutils/tenv/releases/download/v1.9.0/tenv_v1.9.0_Windows_i386.zip'\''/g' tenv/tools/chocolateyinstall.ps1
git push origin --tags main

0 comments on commit 7c4ff58

Please sign in to comment.