diff --git a/.github/workflows/publish-jetbrains.yml b/.github/workflows/publish-jetbrains.yml index 7952de3..3076f43 100644 --- a/.github/workflows/publish-jetbrains.yml +++ b/.github/workflows/publish-jetbrains.yml @@ -17,6 +17,8 @@ jobs: steps: - uses: actions/checkout@v4 + with: + fetch-tags: true - name: Set up JDK uses: actions/setup-java@v4 @@ -25,6 +27,6 @@ jobs: java-version: '21' - name: Publish Plugin - if: github.ref_protected + if: github.event_name == 'release' working-directory: client/intellij run: ./gradlew publishPlugin -Ptoken=${{ secrets.JETBRAINS_TOKEN }} diff --git a/.github/workflows/publish-pypi.yml b/.github/workflows/publish-pypi.yml index 487ada0..0014e89 100644 --- a/.github/workflows/publish-pypi.yml +++ b/.github/workflows/publish-pypi.yml @@ -21,7 +21,7 @@ jobs: steps: - uses: actions/checkout@v4 with: - fetch-depth: 0 + fetch-tags: true - name: Set up Python uses: actions/setup-python@v5 @@ -33,7 +33,7 @@ jobs: run: python -m pip wheel . --no-deps -w dist - name: Publish package distributions to PyPI - if: github.ref_protected + if: github.event_name == 'release' uses: pypa/gh-action-pypi-publish@release/v1 with: packages-dir: server/dist diff --git a/.github/workflows/publish-vscode.yml b/.github/workflows/publish-vscode.yml index 468f215..057e3cb 100644 --- a/.github/workflows/publish-vscode.yml +++ b/.github/workflows/publish-vscode.yml @@ -28,6 +28,6 @@ jobs: run: npm ci - name: Publish - if: github.ref_protected - run: npm version ${{ github.ref }} && + if: github.event_name == 'release' + run: npm version ${{ github.ref_name }} && npm run vsce publish -p ${{ secrets.VSCE_TOKEN }}