diff --git a/.github/workflows/create-vsix-artifact.yml b/.github/workflows/create-vsix-artifact.yml new file mode 100644 index 0000000..3fb73ea --- /dev/null +++ b/.github/workflows/create-vsix-artifact.yml @@ -0,0 +1,27 @@ +name: create-vsix-artifact +on: + workflow_call: + +jobs: + build-and-upload: + runs-on: ubuntu-latest + steps: + - name: 'Check out the code' + uses: actions/checkout@v3 + - name: 'Set up NodeJS' + uses: actions/setup-node@v3 + with: + node-version: 'lts/*' # Node LTS should always be fine. + - name: 'Install node dependencies' + run: yarn + - name: 'Create VSIX' + run: vsce package + - name: 'Upload artifact' + uses: actions/upload-artifact@v3 + with: + name: test-vsix + path: ./sfdx-code-analyzer-vscode-*.vsix + + + + diff --git a/.github/workflows/validate-pr.yml b/.github/workflows/validate-pr.yml index 592f3f2..88324b0 100644 --- a/.github/workflows/validate-pr.yml +++ b/.github/workflows/validate-pr.yml @@ -2,6 +2,9 @@ name: validate-pr on: pull_request: types: [edited, opened, reopened, synchronize] + push: + branches: + - main jobs: # We need to verify that the Pull Request's title matches the desired format. @@ -18,3 +21,6 @@ jobs: # Separately, we also need to run our tests run_tests: uses: ./.github/workflows/run-tests.yml + # Additionally, build a VSIX that can be downloaded by the user if needed. + create-vsix-artifact: + uses: ./.github/workflows/create-vsix-artifact.yml