From 7be2c7d68887beafd904e7ec09e7808ac0ac0b2c Mon Sep 17 00:00:00 2001 From: Luca Stocchi Date: Tue, 4 Jan 2022 12:01:21 +0100 Subject: [PATCH 1/3] add workflow to automate new release and attach vsix Signed-off-by: Luca Stocchi --- .github/workflows/release.yml | 51 +++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..1bd5341 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,51 @@ +name: Generate plugin archive for new release +on: [workflow_dispatch] + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Setup node + uses: actions/setup-node@v1 + with: + node-version: 15 + - name: Install dependencies + run: npm install + - name: Build + run: npm run compile + - name: Run Unit tests + uses: GabrielBB/xvfb-action@v1.0 + with: + run: npm test + - name: Run UI tests + uses: GabrielBB/xvfb-action@v1.0 + with: + run: npm run ui-test + - name: Get current package version + id: package_version + uses: martinbeentjes/npm-get-version-action@v1.1.0 + - name: Create a Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name : ${{ steps.package_version.outputs.current-version}} + release_name: ${{ steps.package_version.outputs.current-version}} + body: Release ${{ steps.package_version.outputs.current-version}} + - name: Create vsix + id: create_vsix + uses: HaaLeo/publish-vscode-extension@v0 + with: + pat: 'no_necessary_as_we_do_not_publish_on_marketplace' + dryRun: true + - name: Attach vsix to release + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ${{ steps.create_vsix.outputs.vsixPath}} + asset_name: ${{ steps.create_vsix.outputs.vsixPath}} + asset_content_type: application/vsix \ No newline at end of file From 08d557af5691f0930cae770424611441d2a9d35b Mon Sep 17 00:00:00 2001 From: Luca Stocchi Date: Tue, 4 Jan 2022 12:06:55 +0100 Subject: [PATCH 2/3] remove missing npm scripts Signed-off-by: Luca Stocchi --- .github/workflows/release.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1bd5341..16d161b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -13,15 +13,11 @@ jobs: - name: Install dependencies run: npm install - name: Build - run: npm run compile + run: npm run build - name: Run Unit tests uses: GabrielBB/xvfb-action@v1.0 with: run: npm test - - name: Run UI tests - uses: GabrielBB/xvfb-action@v1.0 - with: - run: npm run ui-test - name: Get current package version id: package_version uses: martinbeentjes/npm-get-version-action@v1.1.0 From 14d726e9cd9b4a3f7c55b20f364c0b46a1f9d40e Mon Sep 17 00:00:00 2001 From: Luca Stocchi Date: Tue, 4 Jan 2022 12:16:20 +0100 Subject: [PATCH 3/3] remove vsix creation Signed-off-by: Luca Stocchi --- .github/workflows/release.yml | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 16d161b..b805503 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -29,19 +29,4 @@ jobs: with: tag_name : ${{ steps.package_version.outputs.current-version}} release_name: ${{ steps.package_version.outputs.current-version}} - body: Release ${{ steps.package_version.outputs.current-version}} - - name: Create vsix - id: create_vsix - uses: HaaLeo/publish-vscode-extension@v0 - with: - pat: 'no_necessary_as_we_do_not_publish_on_marketplace' - dryRun: true - - name: Attach vsix to release - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ${{ steps.create_vsix.outputs.vsixPath}} - asset_name: ${{ steps.create_vsix.outputs.vsixPath}} - asset_content_type: application/vsix \ No newline at end of file + body: Release ${{ steps.package_version.outputs.current-version}} \ No newline at end of file