Update versioning and user agent handling (#14) #47
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: CI | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| permissions: {} | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| checks: write | |
| pull-requests: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'npm' | |
| cache-dependency-path: create-github-app-token/package-lock.json | |
| - name: Install dependencies | |
| run: npm ci | |
| working-directory: create-github-app-token | |
| - name: Run tests | |
| run: npm test | |
| working-directory: create-github-app-token | |
| - name: Publish Test Results | |
| uses: dorny/test-reporter@dc3a92680fcc15842eef52e8c4606ea7ce6bd3f3 # v2.1.1 | |
| if: success() || failure() | |
| with: | |
| name: Jest Tests | |
| path: create-github-app-token/test-results/junit.xml | |
| reporter: jest-junit | |
| fail-on-error: true | |
| use-actions-summary: true | |
| - name: Publish Code Coverage Results | |
| uses: 5monkeys/cobertura-action@ee5787cc56634acddedc51f21c7947985531e6eb # v14 | |
| if: success() || failure() | |
| with: | |
| path: create-github-app-token/coverage/cobertura-coverage.xml | |
| minimum_coverage: 80 | |
| fail_below_threshold: false | |
| show_line: true | |
| show_branch: true | |
| show_class_names: true | |
| only_changed_files: false | |
| - name: Build | |
| run: npm run build | |
| working-directory: create-github-app-token | |
| - name: Package | |
| run: npm run package | |
| working-directory: create-github-app-token | |
| - name: Install tfx-cli | |
| run: npm install -g tfx-cli | |
| - name: Create Extension Package | |
| run: | | |
| tfx extension create \ | |
| --manifest-globs vss-extension.json \ | |
| --no-prompt \ | |
| --publisher ${PUBLISHER} | |
| env: | |
| PUBLISHER: ${{ vars.PUBLISHER || 'ENTER YOUR PUBLISHER HERE' }} | |
| - name: Upload Package to Artifacts | |
| if: github.event_name == 'push' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: extension | |
| path: '*.vsix' |