5
5
types : [opened, reopened, synchronize]
6
6
7
7
jobs :
8
+ package :
9
+ name : Package Extension
10
+ runs-on : ubuntu-latest
11
+ container :
12
+ image : swift:6.0-jammy
13
+ outputs :
14
+ artifact-id : ${{ steps.archive.outputs.artifact-id }}
15
+ steps :
16
+ - name : Checkout repository
17
+ uses : actions/checkout@v4
18
+ - name : Build Extension
19
+ run : |
20
+ export NODE_VERSION=v20.18.2
21
+ export NODE_PATH=/usr/local/nvm/versions/node/v20.18.2/bin
22
+ export NVM_DIR=/usr/local/nvm
23
+ . .github/workflows/scripts/setup-linux.sh
24
+ [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
25
+ npm ci
26
+ npm run compile
27
+ npm run package
28
+ npm run preview-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
34
+ git rev-parse HEAD > vscode-swift-sha.txt
35
+ - name : Archive production artifacts
36
+ id : archive
37
+ uses : actions/upload-artifact@v4
38
+ if : ${{ env.ACT != 'true' }}
39
+ with :
40
+ if-no-files-found : error
41
+ name : vscode-swift-extension
42
+ path : |
43
+ *.vsix
44
+ vscode-swift-sha.txt
45
+
8
46
tests :
9
47
name : ${{ contains(github.event.pull_request.labels.*.name, 'full-test-run') && 'Full Test Run' || 'Test'}}
10
48
uses : swiftlang/github-workflows/.github/workflows/swift_package_test.yml@main
49
+ needs : package
11
50
with :
12
51
# Linux
13
52
linux_exclude_swift_versions : ' [{"swift_version": "nightly-6.1"},{"swift_version": "nightly-main"}]'
@@ -17,13 +56,18 @@ jobs:
17
56
NVM_DIR=/usr/local/nvm
18
57
CI=1
19
58
FAST_TEST_RUN=${{ contains(github.event.pull_request.labels.*.name, 'full-test-run') && '0' || '1'}}
59
+ VSCODE_SWIFT_VSIX_ID=${{needs.package.outputs.artifact-id}}
60
+ GITHUB_REPOSITORY=${{github.repository}}
20
61
linux_pre_build_command : . .github/workflows/scripts/setup-linux.sh
21
62
linux_build_command : ./scripts/test.sh
22
63
# Windows
23
64
windows_exclude_swift_versions : ' [{"swift_version": "nightly-6.1"},{"swift_version": "nightly"}]'
24
65
windows_env_vars : |
25
66
CI=1
26
67
FAST_TEST_RUN=${{ contains(github.event.pull_request.labels.*.name, 'full-test-run') && '0' || '1'}}
68
+ VSCODE_SWIFT_VSIX_ID=${{needs.package.outputs.artifact-id}}
69
+ VSCODE_SWIFT_VSIX=vscode-swift.vsix
70
+ GITHUB_REPOSITORY=${{github.repository}}
27
71
windows_pre_build_command : .github\workflows\scripts\windows\install-nodejs.ps1
28
72
windows_build_command : scripts\test_windows.ps1
29
73
enable_windows_docker : false
0 commit comments