fixing fetch depth #16
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: "Build" | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths-ignore: | |
| - "**/*.md" | |
| - "**/*.gitignore" | |
| - "**/*.gitattributes" | |
| pull_request: | |
| branches: | |
| - main | |
| paths-ignore: | |
| - "**/*.md" | |
| - "**/*.gitignore" | |
| - "**/*.gitattributes" | |
| workflow_dispatch: | |
| branches: | |
| - main | |
| paths-ignore: | |
| - "**/*.md" | |
| - "**/*.gitignore" | |
| - "**/*.gitattributes" | |
| jobs: | |
| build: | |
| name: Build | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20.x" # Updated Node.js version | |
| - name: Install dependencies | |
| run: npm install | |
| - name: Install vsce | |
| run: npm install -g @vscode/vsce | |
| - name: Install cross-env | |
| run: npm install -g cross-env | |
| - name: 🏷️ NBGV | |
| uses: dotnet/nbgv@master | |
| id: nbgv | |
| with: | |
| stamp: package.json | |
| - name: 🗣️ NBGV outputs | |
| run: | | |
| echo "SimpleVersion: ${{ steps.nbgv.outputs.SimpleVersion }}" | |
| - name: Package | |
| run: vsce package | |
| - name: Publish | |
| if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} | |
| run: npm run deploy | |
| env: | |
| VSCE_PAT: ${{ secrets.VSCE_PAT }} | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ github.event.repository.name }}.vsix | |
| path: | | |
| **/*.vsix | |
| - name: 🏷️ Tag and Release | |
| id: tag_release | |
| uses: softprops/[email protected] | |
| with: | |
| tag_name: ${{ steps.nbgv.outputs.SimpleVersion }} | |
| body: | | |
| ## Release Notes | |
| - Version: ${{ steps.nbgv.outputs.SimpleVersion }} | |
| - Commit: ${{ github.sha }} | |
| - Date: ${{ github.event.head_commit.timestamp }} | |
| generate_release_notes: true | |
| files: | | |
| **/*.vsix |