Skip to content

Commit

Permalink
Fix version for PyPI (#36)
Browse files Browse the repository at this point in the history
* Fix version for PyPI

* Trigger on release

* Remove whitespace

* Use release tag and fix plugin version
  • Loading branch information
dinvlad authored Apr 19, 2024
1 parent 5174f1f commit fdc972c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 22 deletions.
9 changes: 2 additions & 7 deletions .github/workflows/publish-jetbrains.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
name: Build and Publish to JetBrains Marketplace

on:
push:
branches: [master]
paths:
- ".github/workflows/publish-jetbrains.yml"
- "client/intellij/**"
release:
pull_request:
branches: [master]
paths:
- ".github/workflows/publish-jetbrains.yml"
- "client/intellij/**"


jobs:
publish-jetbrains:
name: Publish release to JetBrains Marketplace
Expand All @@ -30,6 +25,6 @@ jobs:
java-version: '21'

- name: Publish Plugin
if: github.ref == 'refs/heads/master'
if: github.ref_protected
working-directory: client/intellij
run: ./gradlew publishPlugin -Ptoken=${{ secrets.JETBRAINS_TOKEN }}
11 changes: 4 additions & 7 deletions .github/workflows/publish-pypi.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
name: Build and Publish to PyPI

on:
push:
branches: [master]
paths:
- ".github/workflows/publish-pypi.yml"
- "server/**"
release:
pull_request:
branches: [master]
paths:
- ".github/workflows/publish-pypi.yml"
- "server/**"


jobs:
publish-pypi:
name: Upload release to PyPI
Expand All @@ -25,6 +20,8 @@ jobs:

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v5
Expand All @@ -36,7 +33,7 @@ jobs:
run: python -m pip wheel . --no-deps -w dist

- name: Publish package distributions to PyPI
if: github.ref == 'refs/heads/master'
if: github.ref_protected
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: server/dist
12 changes: 4 additions & 8 deletions .github/workflows/publish-vscode.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
name: Build and Publish to VS Code Marketplace

on:
push:
branches: [master]
paths:
- ".github/workflows/publish-vscode.yml"
- "client/vscode/**"
release:
pull_request:
branches: [master]
paths:
- ".github/workflows/publish-vscode.yml"
- "client/vscode/**"


jobs:
publish-vscode:
name: Publish release to VS Code Marketplace
Expand All @@ -33,5 +28,6 @@ jobs:
run: npm ci

- name: Publish
if: github.ref == 'refs/heads/master'
run: npm run vsce publish -p ${{ secrets.VSCE_TOKEN }}
if: github.ref_protected
run: npm version ${{ github.ref }} &&
npm run vsce publish -p ${{ secrets.VSCE_TOKEN }}
1 change: 1 addition & 0 deletions client/intellij/src/main/resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<id>org.broadinstitute.wdl.devtools</id>
<name>WDL DevTools</name>
<vendor url="https://www.broadinstitute.org">Broad Institute</vendor>
<version>@version@</version>

<description>Advanced development tools for Workflow Description Language</description>

Expand Down

0 comments on commit fdc972c

Please sign in to comment.