From 15d407226dbedfe981c054490d61ca80387d3c57 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Mon, 22 Jul 2024 14:43:27 +0100 Subject: [PATCH] ci: fix release workflow --- .github/workflows/publish-release.yml | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index f1a2f1d..aa60542 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -25,7 +25,7 @@ jobs: run: | APP_VERSION=$(grep "^readonly VERSION" stream-sprout | cut -d'"' -f2) GIT_VERSION=$(git describe --tags | cut -d'-' -f1) - echo "App version: ${REL_VERSION}" + echo "App version: ${APP_VERSION}" echo "Git version: ${GIT_VERSION}" if [ "${APP_VERSION}" != "${GIT_VERSION}" ]; then echo "ERROR! Version mismatch."; @@ -39,8 +39,6 @@ jobs: steps: - uses: actions/checkout@v4 - name: "Build .deb 🍥" - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | sudo apt-get -y update sudo apt-get -y install debhelper devscripts @@ -48,14 +46,13 @@ jobs: rm debian/changelog dch --package stream-sprout --newversion="${REL_VER}-1" --distribution=unstable "New upstream release." --create dpkg-buildpackage --build=binary --no-check-builddeps --compression=gzip - - name: "Draft Release 📥️" - run: | - gh release create "${{ github.ref }}" --draft --generate-notes - - name: "Upload .deb ⤴️" - run: | - gh release upload "${{ github.ref }}" "../stream-sprout_${REL_VER}-1_all.deb" --clobber - name: "Publish release 📤️" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | + REL_VER=$(grep "^readonly VERSION" stream-sprout | cut -d'"' -f2) + gh release create "${{ github.ref }}" --draft --generate-notes + gh release upload "${{ github.ref }}" "../stream-sprout_${REL_VER}-1_all.deb" --clobber if [ "$(gh release view "${{ github.ref }}" --json assets --template '{{len .assets}}')" -lt 0 ]; then exit 1 fi