From 3674a2cf785cc8ff10f08884740d4eb8ab1f74bb Mon Sep 17 00:00:00 2001 From: Neshura Date: Fri, 17 Nov 2023 22:04:20 +0100 Subject: [PATCH] Artifact Usage Instead of Output for ENV Vars --- .forgejo/workflows/build+release.yml | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/.forgejo/workflows/build+release.yml b/.forgejo/workflows/build+release.yml index 756e4ae..d431f93 100644 --- a/.forgejo/workflows/build+release.yml +++ b/.forgejo/workflows/build+release.yml @@ -39,7 +39,7 @@ jobs: run: | . /etc/os-release echo Debian Codename is: $VERSION_CODENAME - echo "debian_codename=$VERSION_CODENAME" >> $GITHUB_OUTPUT + echo "DEBIAN_CODENAME=$VERSION_CODENAME" >> .env - name: Installing Node, NPM run: | @@ -95,8 +95,12 @@ jobs: name: linux-amd64-appimage path: artifacts/comicinfo-editor-v2-${{ github.ref_name }}-amd64.AppImage if-no-files-found: error - outputs: - debian_codename: ${{ steps.store_deb_ver.outputs.debian_codename }} + - + name: Upload .env as Artifact + uses: actions/upload-artifact@v3 + with: + name: build-env + path: .env upload-release: needs: [build-linux] @@ -115,6 +119,11 @@ jobs: ls -lap artifacts/linux-amd64-appimage ls -lap artifacts/linux-amd64-appimage/linux-amd64-appimage ls -lap artifacts/linux-amd64-appimage/linux-amd64-appimage/comicinfo-editor-v2-${{ github.ref_name }}-amd64.AppImage + - + name: Load .env from build job + run: | + mv artifacts/build-env/.env ./.env + export $(xargs <.env) - name: Rearrange Artifact Paths run: | @@ -141,10 +150,10 @@ jobs: run: | echo 'curl -v --user ${{ secrets.FORGEJO_USERNAME }}:${{ secrets.FORGEJO_TOKEN }} \ --upload-file release/comicinfo-editor-v2-${{ github.ref_name }}-amd64.deb \ - https://forgejo.neshweb.net/api/packages/${{ secrets.FORGEJO_USERNAME }}/debian/pool/${{ needs.build-linux.outputs.debian_codename }}/main/upload' + https://forgejo.neshweb.net/api/packages/${{ secrets.FORGEJO_USERNAME }}/debian/pool/$DEBIAN_CODENAME/main/upload' curl -v --user ${{ secrets.FORGEJO_USERNAME }}:${{ secrets.FORGEJO_TOKEN }} \ --upload-file release/comicinfo-editor-v2-${{ github.ref_name }}-amd64.deb \ - https://forgejo.neshweb.net/api/packages/${{ secrets.FORGEJO_USERNAME }}/debian/pool/${{ needs.build-linux.outputs.debian_codename }}/main/upload + https://forgejo.neshweb.net/api/packages/${{ secrets.FORGEJO_USERNAME }}/debian/pool/$DEBIAN_CODENAME/main/upload - name: Release New Version uses: actions/forgejo-release@v1