Skip to content

Commit 96349e3

Browse files
committed
ci: Replace publish action.
1 parent 39d0f83 commit 96349e3

File tree

1 file changed

+9
-20
lines changed

1 file changed

+9
-20
lines changed

.github/workflows/publish.yml

Lines changed: 9 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
lfs: true
1515
- name: Fetch next version
1616
id: nextVersion
17-
uses: VisualPinball/[email protected].6
17+
uses: VisualPinball/[email protected].8
1818
with:
1919
tagPrefix: 'v'
2020
- name: Bump
@@ -43,23 +43,12 @@ jobs:
4343
commitish: ${{ steps.commit.outputs.commitish }}
4444
env:
4545
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
46-
- name: Publish Archive
47-
run: |
48-
echo "//registry.visualpinball.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
49-
npm pack
50-
NPM_ARCHIVE=$(ls org.visualpinball.unity.assets*.tgz)
51-
export NEW_SHA1=($(sha1sum $NPM_ARCHIVE))
52-
rm -rf Assets
53-
echo Publishing dummy...
54-
npm publish
55-
echo Patching package.json...
56-
sudo apt-get install sshpass
57-
sshpass -p ${{ secrets.REGISTRY_SSH_PASSWORD }} scp -v -o StrictHostKeyChecking=no [email protected]:$REGISTRY_SSH_PATH/$NPM_ARCHIVE dummyarch
58-
export OLD_SHA1=($(sha1sum dummyarch))
59-
echo SHA: $OLD_SHA1 $NEW_SHA1
60-
sshpass -p ${{ secrets.REGISTRY_SSH_PASSWORD }} scp -o StrictHostKeyChecking=no $NPM_ARCHIVE [email protected]:$REGISTRY_SSH_PATH
61-
sshpass -p ${{ secrets.REGISTRY_SSH_PASSWORD }} ssh -o StrictHostKeyChecking=no [email protected] "sed -i s/$OLD_SHA1/$NEW_SHA1/g $REGISTRY_SSH_PATH/package.json"
46+
47+
- uses: actions/setup-node@v4
48+
with:
49+
node-version: '20.x'
50+
registry-url: 'https://registry.visualpinball.org'
51+
- name: Publish
52+
run: npm publish
6253
env:
63-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
64-
REGISTRY_SSH_USERNAME: ${{ secrets.REGISTRY_SSH_USERNAME }}
65-
REGISTRY_SSH_PATH: ${{ secrets.REGISTRY_SSH_PATH }}
54+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)