test(gen): variables backslash #68
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Publish | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths-ignore: | |
| - '**.md' | |
| workflow_dispatch: | |
| jobs: | |
| release: | |
| name: Release | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| issues: write | |
| pull-requests: write | |
| packages: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: '18' | |
| registry-url: 'https://registry.npmjs.org' | |
| - name: Setup Deno | |
| uses: denoland/setup-deno@v1 | |
| with: | |
| deno-version: v1.x | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Semantic Release | |
| id: semantic | |
| uses: cycjimmy/semantic-release-action@v4 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| with: | |
| semantic_version: 19 | |
| branches: | | |
| [ | |
| 'main' | |
| ] | |
| extra_plugins: | | |
| @semantic-release/changelog | |
| @semantic-release/git | |
| @semantic-release/exec | |
| - name: Build npm package | |
| if: steps.semantic.outputs.new_release_published == 'true' | |
| run: npm run build | |
| - name: Publish to npm | |
| if: steps.semantic.outputs.new_release_published == 'true' | |
| run: npm publish | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| - name: Update version in deno.json | |
| if: steps.semantic.outputs.new_release_published == 'true' | |
| run: | | |
| VERSION=${{ steps.semantic.outputs.new_release_version }} | |
| jq '.version = "'$VERSION'"' deno.json > deno.json.tmp | |
| mv deno.json.tmp deno.json | |
| - name: Publish to JSR | |
| if: steps.semantic.outputs.new_release_published == 'true' | |
| run: deno publish | |
| env: | |
| JSR_TOKEN: ${{ secrets.JSR_TOKEN }} | |
| - name: Update VSCode extension version | |
| if: steps.semantic.outputs.new_release_published == 'true' | |
| run: | | |
| VERSION=${{ steps.semantic.outputs.new_release_version }} | |
| cd vscode-extension | |
| jq '.version = "'$VERSION'"' package.json > package.json.tmp | |
| mv package.json.tmp package.json | |
| - name: Install vsce | |
| if: steps.semantic.outputs.new_release_published == 'true' | |
| run: npm install -g @vscode/vsce | |
| - name: Package VSCode extension | |
| if: steps.semantic.outputs.new_release_published == 'true' | |
| run: | | |
| cd vscode-extension | |
| vsce package | |
| - name: Publish VSCode extension | |
| if: steps.semantic.outputs.new_release_published == 'true' | |
| run: | | |
| cd vscode-extension | |
| vsce publish -p ${{ secrets.VSCODE_MARKETPLACE_TOKEN }} |