Add VSCode extension contributing GraphQLSP and GraphQL grammars (#416) #350
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: Release | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| release: | |
| name: Release | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 20 | |
| outputs: | |
| has_changesets: ${{ steps.changesets.outputs.hasChangesets }} | |
| has_unpublished_packages: ${{ steps.unpublished.outputs.has_unpublished }} | |
| permissions: | |
| contents: write | |
| issues: write | |
| pull-requests: write | |
| steps: | |
| - name: Checkout Repo | |
| uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Node | |
| uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | |
| with: | |
| package-manager-cache: false | |
| node-version: 22 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8 | |
| with: | |
| version: 11.3.0 | |
| run_install: false | |
| - name: Check for unpublished package versions | |
| id: unpublished | |
| run: node .github/scripts/has-unpublished-packages.mjs | |
| - name: Install Dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Update npm | |
| run: npm install -g npm@11.15.0 | |
| - name: Create Release Pull Request | |
| id: changesets | |
| uses: changesets/action@a45c4d594aa4e2c509dc14a9f2b3b67ba3780d0d # v1.9.0 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| publish: | |
| name: Publish | |
| needs: release | |
| if: needs.release.outputs.has_changesets == 'false' && needs.release.outputs.has_unpublished_packages == 'true' | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 20 | |
| environment: | |
| name: npm | |
| url: https://www.npmjs.com/package/@0no-co/graphqlsp | |
| permissions: | |
| contents: write | |
| id-token: write | |
| issues: write | |
| pull-requests: write | |
| steps: | |
| - name: Checkout Repo | |
| uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Node | |
| uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 | |
| with: | |
| package-manager-cache: false | |
| node-version: 22 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8 | |
| with: | |
| version: 11.3.0 | |
| run_install: false | |
| - name: Install Dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Update npm | |
| run: npm install -g npm@11.15.0 | |
| - name: Publish packages | |
| id: changesets | |
| uses: changesets/action@a45c4d594aa4e2c509dc14a9f2b3b67ba3780d0d # v1.9.0 | |
| with: | |
| publish: node .github/scripts/stage-packages.mjs | |
| createGithubReleases: true | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Notify discord | |
| id: discord-msg | |
| if: steps.changesets.outputs.published == 'true' | |
| uses: ./.github/actions/discord-message | |
| with: | |
| publishedPackages: ${{ steps.changesets.outputs.publishedPackages }} | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }} |