|
| 1 | +name: Release vsix |
| 2 | + |
| 3 | +on: |
| 4 | + pull_request: |
| 5 | + push: |
| 6 | + release: |
| 7 | + types: published |
| 8 | + |
| 9 | +jobs: |
| 10 | + build: |
| 11 | + name: Build |
| 12 | + runs-on: ubuntu-latest |
| 13 | + steps: |
| 14 | + - name: Checkout |
| 15 | + uses: actions/checkout@v2 |
| 16 | + - name: Install Node |
| 17 | + uses: actions/setup-node@v1 |
| 18 | + with: |
| 19 | + node-version: 16 |
| 20 | + - name: Install Dependencies |
| 21 | + uses: borales/actions-yarn@v3 |
| 22 | + with: |
| 23 | + cmd: install |
| 24 | + - name: Package Extension |
| 25 | + id: packageExtension |
| 26 | + uses: HaaLeo/publish-vscode-extension@v1 |
| 27 | + with: |
| 28 | + pat: stub |
| 29 | + dryRun: true |
| 30 | + - name: Upload Extension |
| 31 | + uses: actions/upload-artifact@v2 |
| 32 | + with: |
| 33 | + name: nwscript-ee-lsp |
| 34 | + path: ${{ steps.packageExtension.outputs.vsixPath }} |
| 35 | + |
| 36 | + publish: |
| 37 | + name: Publish |
| 38 | + needs: build |
| 39 | + if: github.event_name == 'release' |
| 40 | + runs-on: ubuntu-latest |
| 41 | + steps: |
| 42 | + - name: Checkout |
| 43 | + uses: actions/checkout@v2 |
| 44 | + - name: Install Node |
| 45 | + uses: actions/setup-node@v1 |
| 46 | + with: |
| 47 | + node-version: 16 |
| 48 | + - name: Install Dependencies |
| 49 | + uses: borales/actions-yarn@v3 |
| 50 | + with: |
| 51 | + cmd: install |
| 52 | + - name: Download Extension |
| 53 | + uses: actions/download-artifact@v2 |
| 54 | + with: |
| 55 | + name: nwscript-ee-lsp |
| 56 | + - name: GitHub Release |
| 57 | + uses: softprops/action-gh-release@v1 |
| 58 | + with: |
| 59 | + generate_release_notes: true |
| 60 | + body: | |
| 61 | + # Summary |
| 62 | + See [changelog](https://github.com/PhilippeChab/nwscript-ee-language-server/blob/main/CHANGELOG.md) |
| 63 | + name: ${{ github.ref_name }} |
| 64 | + fail_on_unmatched_files: true |
| 65 | + files: ${{ needs.build.outputs.vsixPath }} |
| 66 | + - name: Visual Studio Marketplace Release |
| 67 | + uses: HaaLeo/publish-vscode-extension@v1 |
| 68 | + with: |
| 69 | + pat: ${{ secrets.VS_CODE_MARKETPLACE_TOKEN }} |
| 70 | + extensionFile: ${{ needs.build.outputs.vsixPath }} |
| 71 | + registryUrl: https://marketplace.visualstudio.com |
0 commit comments