File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 9393 path : bin/git-crypt
9494
9595 publish :
96- needs : test
96+ needs : [ test, build-git-crypt]
9797 if : startsWith(github.ref, 'refs/tags/v')
9898 runs-on : ubuntu-latest
9999 permissions :
@@ -119,13 +119,43 @@ jobs:
119119 echo "Error: tag $GITHUB_REF_NAME does not match package.json version $PKG_VERSION"
120120 exit 1
121121 fi
122- - run : npm run package
122+
123+ - uses : actions/download-artifact@v4
124+ with :
125+ pattern : git-crypt-*
126+ path : artifacts/
127+
128+ - name : Package platform-specific VSIX files
129+ run : |
130+ for target in darwin-arm64 darwin-x64 linux-x64 linux-arm64; do
131+ mkdir -p bin
132+ cp "artifacts/git-crypt-${target}/git-crypt" bin/git-crypt
133+ chmod +x bin/git-crypt
134+ npx vsce package --target "$target"
135+ rm -rf bin
136+ done
137+
138+ - name : Package universal VSIX (no bundled binary)
139+ run : npx vsce package
140+
141+ - name : Verify VSIX contents
142+ run : |
143+ for f in git-crypt-vscode-*-*.vsix; do
144+ echo "=== $f ==="
145+ npx vsce ls --packagePath "$f" | grep -c 'bin/git-crypt' | xargs -I{} test {} -eq 1
146+ done
147+ echo "=== universal ==="
148+ UNIVERSAL=$(ls git-crypt-vscode-*.vsix | grep -v -- '-darwin\|-linux')
149+ npx vsce ls --packagePath "$UNIVERSAL" | grep -c 'bin/git-crypt' | xargs -I{} test {} -eq 0
150+
123151 - name : Create or update GitHub release
124152 run : |
125153 gh release create "$GITHUB_REF_NAME" git-crypt-vscode-*.vsix --title "$GITHUB_REF_NAME" --generate-notes ||
126154 gh release upload "$GITHUB_REF_NAME" git-crypt-vscode-*.vsix --clobber
127155 env :
128156 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
129- - run : npm run publish
157+
158+ - name : Publish to marketplace
159+ run : npx vsce publish --packagePath git-crypt-vscode-*.vsix
130160 env :
131161 VSCE_PAT : ${{ secrets.VSCE_PAT }}
You can’t perform that action at this time.
0 commit comments