diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 99b8d33..75eb7d5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,9 +2,8 @@ name: Build on: - push: - tags: - - v* + release: + types: [published] jobs: build: @@ -23,22 +22,8 @@ jobs: - name: Build run: | python main.py - - name: Create Release - id: create_release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: ${{ github.ref }} - release_name: ${{ github.ref }} - body: - draft: false - prerelease: false - name: Upload files - uses: svenstaro/upload-release-action@v2 - with: - repo_token: ${{ secrets.GITHUB_TOKEN }} - file: build/* - tag: ${{ github.ref }} - overwrite: true - file_glob: true \ No newline at end of file + shell: bash + run: gh release upload ${{ github.event.release.tag_name }} build/* + env: + GITHUB_TOKEN: ${{ github.token }} diff --git a/vscode_restclient.py b/vscode_restclient.py index 7d34848..386e09a 100644 --- a/vscode_restclient.py +++ b/vscode_restclient.py @@ -50,3 +50,4 @@ def handler(schema, build_folder, version): f"{build_folder}/restclient-vk-api-sandbox", "zip", folder_path) + shutil.rmtree(folder_path, ignore_errors=True)