Skip to content

Commit 5185776

Browse files
committed
ci: Use SSH to upload archive.
1 parent 6fb20c1 commit 5185776

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

.github/workflows/publish.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,22 @@ jobs:
4343
commitish: ${{ steps.commit.outputs.commitish }}
4444
env:
4545
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
46-
- name: Publish
46+
- name: Publish Dummy Archive
4747
run: |
4848
echo "//registry.visualpinball.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
49+
npm pack
50+
echo "NPM_ARCHIVE=$(ls org.visualpinball.unity.assetlibrary*.tgz)" >> $GITHUB_ENV
51+
echo Assets/** >> .gitignore
4952
npm publish
5053
env:
51-
NODE_OPTIONS: "--max_old_space_size=4096"
5254
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
55+
- name: Upload Real Archive
56+
uses: appleboy/scp-action@master
57+
with:
58+
host: registry.visualpinball.org
59+
port: 22
60+
username: ${{ secrets.REGISTRY_SSH_USERNAME }}
61+
key: ${{ secrets.REGISTRY_SSH_KEY }}
62+
source: ${{ env.NPM_ARCHIVE }}
63+
target: ${{ secrets.REGISTRY_SSH_PATH }}
64+

0 commit comments

Comments
 (0)