From 8859da42c65665c7c5f0e66cbe68b8dc46095571 Mon Sep 17 00:00:00 2001 From: missytake Date: Thu, 19 May 2022 19:45:01 +0200 Subject: [PATCH] Fix github action to publish node bindings (#3335) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * make upload to previews fail if it's executed on a tag not a PR * node-package.yml: use tag in uploaded file name * rename file to node-§tag.tar.gz before upload * get rid of bash error? --- .github/workflows/node-package.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/node-package.yml b/.github/workflows/node-package.yml index e010420d2..ba528ce1e 100644 --- a/.github/workflows/node-package.yml +++ b/.github/workflows/node-package.yml @@ -151,6 +151,10 @@ jobs: run: | echo -e "${{ secrets.SSH_KEY }}" >__TEMP_INPUT_KEY_FILE chmod 600 __TEMP_INPUT_KEY_FILE + if [[ -z "${{ steps.prepare.outputs.prid }}" ]] + then + exit 1 + fi scp -o StrictHostKeyChecking=no -v -i __TEMP_INPUT_KEY_FILE -P "22" -r deltachat-node-${{ steps.prepare.outputs.prid }}.tar.gz "${{ secrets.USERNAME }}"@"download.delta.chat":"/var/www/html/download/node/preview/" continue-on-error: true - name: "Post links to details" @@ -167,4 +171,5 @@ jobs: run: | echo -e "${{ secrets.SSH_KEY }}" >__TEMP_INPUT_KEY_FILE chmod 600 __TEMP_INPUT_KEY_FILE - scp -o StrictHostKeyChecking=no -v -i __TEMP_INPUT_KEY_FILE -P "22" -r deltachat-node-${{ steps.prepare.outputs.prid }}.tar.gz "${{ secrets.USERNAME }}"@"download.delta.chat":"/var/www/html/download/node/" + mv deltachat-node-${{ steps.prepare.outputs.prid }}.tar.gz deltachat-node-${{ steps.tag.outputs.tag }}.tar.gz + scp -o StrictHostKeyChecking=no -v -i __TEMP_INPUT_KEY_FILE -P "22" -r deltachat-node-${{ steps.tag.outputs.tag }}.tar.gz "${{ secrets.USERNAME }}"@"download.delta.chat":"/var/www/html/download/node/"