use a PAT for the deploy workflow (#54) #46
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 extension | |
| on: | |
| push: | |
| branches: | |
| - main | |
| workflow_call: | |
| inputs: | |
| ref: | |
| type: string | |
| required: false | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| name: Build extension | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| defaults: | |
| run: | |
| shell: bash | |
| outputs: | |
| artifact-id: ${{ steps.upload.outputs.artifact-id }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 | |
| with: | |
| ref: ${{ inputs.ref || github.sha }} | |
| - uses: ./.github/actions/setup | |
| - name: Bundle TypeScript | |
| run: npm run bundle | |
| - name: Package extension | |
| run: npm run package | |
| - name: Upload extension as artifact | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 | |
| id: upload | |
| with: | |
| name: extension-${{ github.sha }} | |
| path: ./out/vscode-mojo.vsix | |
| retention-days: 14 |