[*] Update infrastructure to the new plugin registry #15
Workflow file for this run
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
| # CI pipeline for nf-python | |
| name: plugin Release | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| jobs: | |
| validate-version: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Extract version from MANIFEST.MF | |
| id: manifest | |
| run: | | |
| version=$(grep '^version =' build.gradle | cut -d'=' -f2 | tr -d " '") | |
| echo "version=$version" >> $GITHUB_OUTPUT | |
| - name: Extract version from git tag | |
| id: tag | |
| run: | | |
| tag_version=${GITHUB_REF##*/} | |
| tag_version=${tag_version#v} | |
| echo "version=$tag_version" >> $GITHUB_OUTPUT | |
| - name: Check versions match | |
| run: | | |
| if [ "${{ steps.manifest.outputs.version }}" != "${{ steps.tag.outputs.version }}" ]; then | |
| echo "MANIFEST.MF ${{ steps.manifest.outputs.version }} and git tag ${{ steps.tag.outputs.version }} do not match!" | |
| # exit 1 | |
| fi | |
| echo "All versions match: ${{ steps.manifest.outputs.version }}" | |
| build-plugin: | |
| needs: validate-version | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '17' | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.10' | |
| - name: Install Python build dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install build | |
| - name: Build Nextflow plugin | |
| run: | | |
| make assemble | |
| - name: Publish plugin to nextflow repository | |
| run: | | |
| # Do it only if secret is available: | |
| if [ -n "${{ secrets.NEXTFLOW_API_KEY }}" ]; then | |
| mkdir -p $HOME/.gradle | |
| echo "npr.apiKey=${{ secrets.NEXTFLOW_API_KEY }}" > $HOME/.gradle/gradle.properties | |
| make release | |
| fi |