From 30cf1afba8d90409bdf2b88117932ef78c386cac Mon Sep 17 00:00:00 2001 From: Neshura Date: Fri, 29 Dec 2023 02:49:38 +0100 Subject: [PATCH] Switch variable referencing style + change if condition check --- .forgejo/workflows/build+release.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.forgejo/workflows/build+release.yml b/.forgejo/workflows/build+release.yml index 5c7fe56..bd89454 100644 --- a/.forgejo/workflows/build+release.yml +++ b/.forgejo/workflows/build+release.yml @@ -67,7 +67,7 @@ jobs: echo "DEBIAN_REF=$DEBIAN_REF" >> dist/build.env DEBIAN_REV=-$(cat Cargo.toml | grep -E "(^|\|)revision =" | cut -f2- -d= | tr -d \" | tr -d " ") echo "DEBIAN_REV=$DEBIAN_REV" >> dist/build.env - mv target/debian/${{ github.event.repository.name }}_"$DEBIAN_REF""$DEBIAN_REV"_amd64.deb dist/${{ github.event.repository.name }}_"$DEBIAN_REF""$DEBIAN_REV"_amd64.deb + mv target/debian/${{ github.event.repository.name }}_${{ DEBIAN_REF }}${{ DEBIAN_REV }}_amd64.deb dist/${{ github.event.repository.name }}_${{ DEBIAN_REF }}${{ DEBIAN_REV }}_amd64.deb - name: Uploading Build Artifact uses: actions/upload-artifact@v3 @@ -95,25 +95,25 @@ jobs: https://forgejo.neshweb.net/api/packages/${{ secrets.FORGEJO_USERNAME }}/generic/${{ github.event.repository.name }}/${{ github.ref_name }}/chellaris-rust-api-linux-amd64 - name: Upload Debian Package to main - if: ! echo ${{ github.ref_name }} | grep -qi '\-rc' + if: !search(github.ref_name, '-rc') run: | source release_blobs/build.env echo 'curl -v --user ${{ secrets.FORGEJO_USERNAME }}:${{ secrets.FORGEJO_TOKEN }} \ - --upload-file release_blobs/${{ github.event.repository.name }}_"$DEBIAN_REF""$DEBIAN_REV"_amd64.deb \ + --upload-file release_blobs/${{ github.event.repository.name }}_${{ DEBIAN_REF }}${{ DEBIAN_REV }}_amd64.deb \ https://forgejo.neshweb.net/api/packages/${{ secrets.FORGEJO_USERNAME }}/debian/pool/bookworm/main/upload' curl -v --user ${{ secrets.FORGEJO_USERNAME }}:${{ secrets.FORGEJO_TOKEN }} \ - --upload-file release_blobs/${{ github.event.repository.name }}_"$DEBIAN_REF""$DEBIAN_REV"_amd64.deb \ + --upload-file release_blobs/${{ github.event.repository.name }}_${{ DEBIAN_REF }}${{ DEBIAN_REV }}_amd64.deb \ https://forgejo.neshweb.net/api/packages/${{ secrets.FORGEJO_USERNAME }}/debian/pool/bookworm/main/upload - name: Upload Debian Package to staging - if: echo ${{ github.ref_name }} | grep -qi '\-rc' + if: search(github.ref_name, '-rc') run: | source release_blobs/build.env echo 'curl -v --user ${{ secrets.FORGEJO_USERNAME }}:${{ secrets.FORGEJO_TOKEN }} \ - --upload-file release_blobs/${{ github.event.repository.name }}_"$DEBIAN_REF""$DEBIAN_REV"_amd64.deb \ + --upload-file release_blobs/${{ github.event.repository.name }}_${{ DEBIAN_REF }}${{ DEBIAN_REV }}_amd64.deb \ https://forgejo.neshweb.net/api/packages/${{ secrets.FORGEJO_USERNAME }}/debian/pool/bookworm/staging/upload' curl -v --user ${{ secrets.FORGEJO_USERNAME }}:${{ secrets.FORGEJO_TOKEN }} \ - --upload-file release_blobs/${{ github.event.repository.name }}_"$DEBIAN_REF""$DEBIAN_REV"_amd64.deb \ + --upload-file release_blobs/${{ github.event.repository.name }}_${{ DEBIAN_REF }}${{ DEBIAN_REV }}_amd64.deb \ https://forgejo.neshweb.net/api/packages/${{ secrets.FORGEJO_USERNAME }}/debian/pool/bookworm/staging/upload - name: Release New Version