Skip to content

Commit

Permalink
Change official builds to use platform-specific VSIXs (dotnet#4852)
Browse files Browse the repository at this point in the history
This PR hopefully completes the work to switch to platform-specific VSIXs. This renames the gulp tasks to give better names and changes the official builds to use the new tasks.
  • Loading branch information
gregg-miskelly authored Oct 28, 2021
1 parent 7157bbc commit b43193c
Show file tree
Hide file tree
Showing 5 changed files with 68 additions and 9 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ jobs:
- name: Compile
run: npm run compile

- name: Build extension package
run: gulp 'vsix:release:package'
- name: Build platform-neutral extension package
run: gulp 'vsix:release:package:platform-neutral'

- name: Run unit and integration tests
run: |
Expand All @@ -45,3 +45,6 @@ jobs:
env:
CODE_VERSION: 1.45.0
DISPLAY: :99.0

- name: Build platform-specific extension package
run: gulp 'vsix:release:package:platform-specific'
63 changes: 59 additions & 4 deletions .github/workflows/release-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,76 @@ jobs:
npm i -g gulp
- name: Build extension package
run: gulp 'vsix:release:package'
run: gulp 'vsix:release:package:platform-specific'

- name: Run release tests
run: npm run test:release

- name: Get package version
run: node -e "console.log('VERSION=' + require('./package.json').version)" >> $GITHUB_ENV

- name: Upload release build
- name: Upload release build (darwin-arm64)
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./csharp-${{ env.VERSION }}.vsix
asset_name: csharp-${{ env.VERSION }}.vsix
asset_path: ./csharp-${{ env.VERSION }}-(darwin-arm64).vsix
asset_name: csharp-${{ env.VERSION }}-(darwin-arm64).vsix
asset_content_type: application/zip

- name: Upload release build (darwin-x64)
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./csharp-${{ env.VERSION }}-(darwin-x64).vsix
asset_name: csharp-${{ env.VERSION }}-(darwin-x64).vsix
asset_content_type: application/zip

- name: Upload release build (linux-x64)
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./csharp-${{ env.VERSION }}-(linux-x64).vsix
asset_name: csharp-${{ env.VERSION }}-(linux-x64).vsix
asset_content_type: application/zip

- name: Upload release build (win32-arm64)
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./csharp-${{ env.VERSION }}-(win32-arm64).vsix
asset_name: csharp-${{ env.VERSION }}-(win32-arm64).vsix
asset_content_type: application/zip

- name: Upload release build (win32-ia32)
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./csharp-${{ env.VERSION }}-(win32-ia32).vsix
asset_name: csharp-${{ env.VERSION }}-(win32-ia32).vsix
asset_content_type: application/zip

- name: Upload release build (win32-x64)
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./csharp-${{ env.VERSION }}-(win32-x64).vsix
asset_name: csharp-${{ env.VERSION }}-(win32-x64).vsix
asset_content_type: application/zip
3 changes: 2 additions & 1 deletion tasks/backcompatTasks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@

import * as gulp from 'gulp';

gulp.task('package:offline', gulp.series('vsix:offline:package'));
gulp.task('package:offline', gulp.series('vsix:release:package:platform-specific'));
gulp.task('vsix:offline:package', gulp.series('vsix:release:package:platform-specific'));
2 changes: 1 addition & 1 deletion tasks/offlinePackagingTasks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export function getPackageName(packageJSON: any, vscodePlatformId: string) {
return `${name}.${version}-${vscodePlatformId}.vsix`;
}

gulp.task('vsix:offline:package', async () => {
gulp.task('vsix:release:package:platform-specific', async () => {

if (process.platform === 'win32') {
throw new Error('Do not build offline packages on windows. Runtime executables will not be marked executable in *nix packages.');
Expand Down
2 changes: 1 addition & 1 deletion tasks/onlinePackagingTasks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ gulp.task('vsix:release:unpackage', () => {
return fs.createReadStream(packageName).pipe(Extract({ path: unpackedVsixPath }));
});

gulp.task('vsix:release:package', async (onError) => {
gulp.task('vsix:release:package:platform-neutral', async (onError) => {
del.sync(vscodeignorePath);

fs.copyFileSync(onlineVscodeignorePath, vscodeignorePath);
Expand Down

0 comments on commit b43193c

Please sign in to comment.