Skip to content

Commit 2740a76

Browse files
committed
Use VSIX in downstream jobs
1 parent b86aabd commit 2740a76

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

.github/workflows/nightly.yml

+12
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ jobs:
1111
runs-on: ubuntu-latest
1212
container:
1313
image: swift:6.0-jammy
14+
outputs:
15+
artifact-url: ${{ steps.archive.outputs.artifact-url }}
1416
steps:
1517
- name: Checkout repository
1618
uses: actions/checkout@v4
@@ -24,15 +26,23 @@ jobs:
2426
npm ci
2527
npm run compile
2628
npm run package
29+
for file in *.vsix; do
30+
name="$(basename "$file" .vsix)-${{github.run_number}}.vsix"
31+
echo "Created bundle $name"
32+
mv "$file" "$name"
33+
done
2734
- name: Archive production artifacts
35+
id: archive
2836
uses: actions/upload-artifact@v4
2937
if: always()
3038
with:
39+
if-no-files-found: error
3140
name: vscode-swift-extension
3241
path: |
3342
*.vsix
3443
tests_release:
3544
name: Test Release
45+
needs: package
3646
uses: swiftlang/github-workflows/.github/workflows/swift_package_test.yml@main
3747
with:
3848
# Linux
@@ -41,6 +51,7 @@ jobs:
4151
NODE_PATH=/usr/local/nvm/versions/node/v18.19.0/bin
4252
NVM_DIR=/usr/local/nvm
4353
CI=1
54+
VSCODE_SWIFT_VSIX_URL=${{needs.package.outputs.artifact-url}}
4455
linux_pre_build_command: . .github/workflows/scripts/setup-linux.sh
4556
linux_build_command: ./scripts/test.sh
4657
# Windows
@@ -53,6 +64,7 @@ jobs:
5364

5465
tests_insiders:
5566
name: Test Insiders
67+
needs: package
5668
uses: swiftlang/github-workflows/.github/workflows/swift_package_test.yml@main
5769
with:
5870
# Linux

.github/workflows/scripts/setup-linux.sh

+7
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,13 @@ export NODE_PATH=/usr/local/nvm/versions/node/v18.19.0/bin
1818
export NVM_DIR=/usr/local/nvm
1919

2020
apt-get update && apt-get install -y rsync curl gpg libasound2 libgbm1 libgtk-3-0 libnss3 xvfb build-essential
21+
22+
if [ ! -z "$VSCODE_SWIFT_VSIX_URL" ]; then
23+
export VSCODE_SWIFT_VSIX="$PWD/vscode-swift.vsix"
24+
echo "Downloading $VSCODE_SWIFT_VSIX_URL to $VSCODE_SWIFT_VSIX"
25+
curl -o $VSCODE_SWIFT_VSIX "$VSCODE_SWIFT_VSIX_URL"
26+
fi
27+
2128
mkdir -p $NVM_DIR
2229
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
2330
/bin/bash -c "source $NVM_DIR/nvm.sh && nvm install $NODE_VERSION"

0 commit comments

Comments
 (0)