Skip to content

Commit

Permalink
ci: Use SSH to upload archive.
Browse files Browse the repository at this point in the history
  • Loading branch information
freezy committed Dec 1, 2021
1 parent 6fb20c1 commit 5185776
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,22 @@ jobs:
commitish: ${{ steps.commit.outputs.commitish }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Publish
- name: Publish Dummy Archive
run: |
echo "//registry.visualpinball.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
npm pack
echo "NPM_ARCHIVE=$(ls org.visualpinball.unity.assetlibrary*.tgz)" >> $GITHUB_ENV
echo Assets/** >> .gitignore
npm publish
env:
NODE_OPTIONS: "--max_old_space_size=4096"
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Upload Real Archive
uses: appleboy/scp-action@master
with:
host: registry.visualpinball.org
port: 22
username: ${{ secrets.REGISTRY_SSH_USERNAME }}
key: ${{ secrets.REGISTRY_SSH_KEY }}
source: ${{ env.NPM_ARCHIVE }}
target: ${{ secrets.REGISTRY_SSH_PATH }}

0 comments on commit 5185776

Please sign in to comment.