Skip to content

Commit

Permalink
Merge of #3913
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored Aug 22, 2023
2 parents 5f56442 + 6bafe6b commit e087453
Show file tree
Hide file tree
Showing 17 changed files with 63 additions and 339 deletions.
76 changes: 24 additions & 52 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,15 @@ env:
RUST_VERSION: "1.67.1"
NODE_VERSION: "18.16.0"
PNPM_VERSION: "8.6.3"
CARGO_TERM_COLOR: always
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ vars.TURBO_TEAM }}

jobs:
build:
name: "Build"
timeout-minutes: 30
runs-on: ubuntu-latest
env:
CARGO_TERM_COLOR: always
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ vars.TURBO_TEAM }}
outputs:
version: ${{ fromJson(steps.changelog.outputs.data).newVersion }}
last-version: ${{ fromJson(steps.changelog.outputs.data).lastVersion }}
Expand Down Expand Up @@ -66,6 +65,9 @@ jobs:

- name: Setup Cargo Cache
uses: Swatinem/rust-cache@v2
with:
# Don't save cache here, to avoid thrashing with test job
save-if: false

- name: Install Dependencies
run: pnpm install --frozen-lockfile
Expand All @@ -81,18 +83,6 @@ jobs:
env:
SEGMENT_WRITE_KEY: ${{ secrets.SEGMENT_WRITE_KEY }}

- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: dist
path: dist/*.tgz

- name: Upload WingC WASM
uses: actions/upload-artifact@v3
with:
name: wingc
path: libs/wingcompiler/wingc.wasm

- name: Derive appropriate SHAs for base and head
id: setSHAs
uses: nrwl/nx-set-shas@v3
Expand All @@ -106,35 +96,19 @@ jobs:
echo "diff=true" >> "$GITHUB_OUTPUT"
fi
- name: Upload Extension
uses: actions/upload-artifact@v3
with:
name: vscode-wing
path: apps/vscode-wing/vscode-wing.vsix

- name: Compress Docs
run: tar -czvf docs.tgz docs/*

- name: Upload Docs
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: docs
path: docs.tgz
name: dist
path: dist/*

test:
name: Test
timeout-minutes: 30
runs-on: ubuntu-latest
env:
CARGO_TERM_COLOR: always
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ vars.TURBO_TEAM }}

steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 1

- name: Setup pnpm
uses: pnpm/action-setup@v2.2.4
Expand Down Expand Up @@ -227,7 +201,7 @@ jobs:
path: tools/hangar/results/report.json

- name: Create Markdown report
run: node scripts/benchmark_json_to_table.mjs
run: scripts/benchmark_json_to_table.mjs

e2e-test:
name: "E2E / ${{ matrix.runner }} + Node${{ matrix.node }} [${{ matrix.shard }}]"
Expand All @@ -254,8 +228,6 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 1

- name: Setup pnpm
uses: pnpm/action-setup@v2.2.4
Expand Down Expand Up @@ -349,25 +321,28 @@ jobs:
repo-token: "${{ secrets.PROJEN_GITHUB_TOKEN }}"
tag: "v${{ needs.build.outputs.version }}"

- name: Login to NPM registry
run: npm set //registry.npmjs.org/:_authToken ${{ secrets.NPM_PUBLISH_TOKEN }}

- name: Publish npm packages
working-directory: dist
env:
PACKAGE_VERSION: ${{ needs.build.outputs.version }}
run: |
PACKAGES=("winglang-sdk" "winglang-compiler" "wingconsole-design-system" "wingconsole-ui" "wingconsole-server" "wingconsole-app")
for PACKAGE in $PACKAGES; do
npm publish "$PACKAGE-$PACKAGE_VERSION.tgz" --access public
done
- name: Publish Extension to Visual Studio Marketplace
if: needs.build.outputs.vscode-wing-changed == 'true'
uses: "HaaLeo/publish-vscode-extension@v1"
with:
pat: ${{ secrets.VS_MARKETPLACE_TOKEN }}
registryUrl: "https://marketplace.visualstudio.com"
extensionFile: "vscode-wing/vscode-wing.vsix"
extensionFile: "dist/vscode-wing.vsix"
dependencies: false

- name: Login to NPM registry
run: npm set //registry.npmjs.org/:_authToken ${{ secrets.NPM_PUBLISH_TOKEN }}

- name: Publish npm packages
run: |
for file in *.tgz; do
npm publish "$file" --access public
done
working-directory: dist

- name: Write Changelog
uses: DamianReeves/write-file-action@v1.2
with:
Expand All @@ -377,9 +352,6 @@ jobs:

- name: Compute Checksums
run: |
mv ./docs/*.tgz ./dist
mv ./*/*.vsix ./dist
mv ./*/*.wasm ./dist
mv ./benchmarks/* ./dist
cd dist
Expand Down
202 changes: 0 additions & 202 deletions apps/jsii-docgen/LICENSE.md

This file was deleted.

2 changes: 1 addition & 1 deletion apps/vscode-wing/.projen/tasks.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion apps/vscode-wing/.projenrc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,9 @@ project.watchTask.reset("tsup --watch");
project.packageTask.reset(
"pnpm version ${PROJEN_BUMP_VERSION:-0.0.0} --allow-same-version"
);
project.packageTask.exec("vsce package --no-dependencies -o vscode-wing.vsix");
project.packageTask.exec(
"vsce package --no-dependencies -o ../../dist/vscode-wing.vsix"
);

project.addFields({
volta: {
Expand Down
19 changes: 0 additions & 19 deletions apps/vscode-wing/LICENSE.md

This file was deleted.

Loading

0 comments on commit e087453

Please sign in to comment.