Nightly #711
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Nightly | |
| permissions: | |
| contents: read | |
| on: | |
| schedule: | |
| - cron: "0 0 * * *" | |
| workflow_dispatch: | |
| inputs: | |
| patchRelease: | |
| description: 'Make a patch release' | |
| required: false | |
| type: boolean | |
| jobs: | |
| package: | |
| name: Package Extension | |
| runs-on: ubuntu-latest | |
| container: | |
| image: swift:6.0-jammy | |
| outputs: | |
| artifact-id: ${{ steps.archive.outputs.artifact-id }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Build Extension | |
| env: | |
| PATCH_RELEASE: ${{ github.event.inputs.patchRelease }} | |
| run: | | |
| . .github/workflows/scripts/setup-linux.sh | |
| [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" | |
| npm ci | |
| if [ "$PATCH_RELEASE" = "true" ]; then | |
| echo "Making patch release\n" | |
| npm run patch-package | |
| else | |
| npm run package | |
| fi | |
| npm run preview-package | |
| for file in *.vsix; do | |
| name="$(basename "$file" .vsix)-${{github.run_number}}.vsix" | |
| echo "Created bundle $name" | |
| mv "$file" "$name" | |
| done | |
| git config --global --add safe.directory $PWD | |
| git rev-parse HEAD > vscode-swift-sha.txt | |
| - name: Archive production artifacts | |
| id: archive | |
| uses: actions/upload-artifact@v7 | |
| if: ${{ env.ACT != 'true' }} | |
| with: | |
| if-no-files-found: error | |
| name: vscode-swift-extension | |
| path: | | |
| *.vsix | |
| vscode-swift-sha.txt | |
| tests_release: | |
| name: Test Release | |
| needs: package | |
| uses: swiftlang/github-workflows/.github/workflows/swift_package_test.yml@0.0.11 | |
| with: | |
| needs_token: true | |
| # Linux | |
| # Run against all of the swift versions from https://github.com/swiftlang/github-workflows/blob/main/.github/workflows/swift_package_test.yml#L44 | |
| linux_env_vars: | | |
| NODE_VERSION=${{ needs.package.outputs.node-version }} | |
| NODE_PATH=${{ needs.package.outputs.node-path }} | |
| NVM_DIR=/usr/local/nvm | |
| CI=1 | |
| VSCODE_SWIFT_VSIX_ID=${{needs.package.outputs.artifact-id}} | |
| GITHUB_REPOSITORY=${{github.repository}} | |
| linux_pre_build_command: . .github/workflows/scripts/setup-linux.sh | |
| linux_build_command: ./scripts/test.sh | |
| # Windows | |
| # Run against all of the swift versions from https://github.com/swiftlang/github-workflows/blob/main/.github/workflows/swift_package_test.yml#L85 | |
| windows_env_vars: | | |
| CI=1 | |
| VSCODE_SWIFT_VSIX_ID=${{needs.package.outputs.artifact-id}} | |
| GITHUB_REPOSITORY=${{github.repository}} | |
| windows_pre_build_command: . .github\workflows\scripts\windows\setup.ps1 | |
| windows_build_command: Invoke-Program scripts\test_windows.ps1 | |
| enable_windows_docker: false |