fix(settings): make API key and base URL actions discoverable (#276) #77
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] | |
| concurrency: | |
| group: release-${{ github.ref }} | |
| cancel-in-progress: false | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| issues: write | |
| outputs: | |
| release_created: ${{ steps.release.outputs.release_created }} | |
| tag_name: ${{ steps.release.outputs.tag_name }} | |
| steps: | |
| - uses: googleapis/release-please-action@v4 | |
| id: release | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| config-file: .github/release-please-config.json | |
| manifest-file: .github/release-please-manifest.json | |
| publish: | |
| needs: release | |
| if: needs.release.outputs.release_created == 'true' | |
| runs-on: ubuntu-latest | |
| environment: production | |
| concurrency: | |
| group: publish-${{ needs.release.outputs.tag_name }} | |
| cancel-in-progress: false | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ needs.release.outputs.tag_name }} | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 24 | |
| cache: npm | |
| - run: npm ci | |
| - run: rm -rf dist && mkdir -p dist && npm run package | |
| - name: Locate VSIX | |
| id: vsix | |
| shell: bash | |
| run: | | |
| shopt -s nullglob | |
| files=(dist/*.vsix) | |
| if [ "${#files[@]}" -ne 1 ]; then | |
| echo "Expected exactly one VSIX in dist, found ${#files[@]}" >&2 | |
| printf '%s\n' "${files[@]}" >&2 | |
| exit 1 | |
| fi | |
| echo "path=${files[0]}" >> "$GITHUB_OUTPUT" | |
| - name: Publish to VS Code Marketplace | |
| if: vars.PUBLISH_VSCODE_MARKETPLACE != 'false' | |
| run: npm exec -- vsce publish --packagePath "${{ steps.vsix.outputs.path }}" --skip-duplicate | |
| env: | |
| VSCE_PAT: ${{ secrets.VSCE_PAT }} | |
| - name: Publish to Open VSX | |
| if: vars.PUBLISH_OPEN_VSX != 'false' | |
| run: npm exec -- ovsx publish --skip-duplicate "${{ steps.vsix.outputs.path }}" | |
| env: | |
| OVSX_PAT: ${{ secrets.OVSX_PAT }} | |
| - name: Attach VSIX to GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: ${{ needs.release.outputs.tag_name }} | |
| files: ${{ steps.vsix.outputs.path }} | |
| fail_on_unmatched_files: true | |
| - name: Show release info | |
| run: | | |
| echo "Released ${{ needs.release.outputs.tag_name }}" |