diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 17ce8736b..810e4d822 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -171,46 +171,4 @@ jobs: sudo chown -R runneradmin:runneradmin docs task docsCompile sudo chown -R runner:docker docs - ls -la docs/* - - publish-snapshots: - name: Publish Snapshots - runs-on: - - ubuntu-22.04 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - steps: - - uses: actions/checkout@v3 - timeout-minutes: 1 - with: - fetch-depth: 0 # Needed for git-based changelog. - - name: Setup pypirc file - timeout-minutes: 1 - env: - TESTPYPI_TOKEN: ${{ secrets.TESTPYPI_TOKEN }} - PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} - run: envsubst < .github/workflows/pypirc.template > $HOME/.pypirc - - uses: actions/setup-java@v3 - timeout-minutes: 1 - with: - distribution: 'adopt' - java-version: 19 - cache: 'sbt' - - uses: actions/setup-python@v4 - timeout-minutes: 1 - with: - python-version: '3.10.8' - cache: 'pip' - - uses: arduino/setup-task@v1 - timeout-minutes: 1 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - - name: Install Setuptools - timeout-minutes: 1 - run: python3 -m pip install setuptools - - name: Publish to PyPi - timeout-minutes: 1 - run: task pyPublishSnapshot VERSION=$(cat version)-dev${{ github.run_number }} - - name: Publish Plugin to Github - timeout-minutes: 5 - run: task jvmPublishSnapshot VERSION=$(cat version)-PR${{ github.event.pull_request.number }}-SNAPSHOT + ls -la docs/* \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5353b578f..7c4ab41c4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,7 +8,67 @@ permissions: id-token: write jobs: + release-plugin: + runs-on: + - ubuntu-22.04 + timeout-minutes: 10 + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 # Needed for git-based changelog. + - uses: actions/setup-java@v3 + with: + distribution: 'adopt' + java-version: 19 + cache: 'sbt' + - uses: arduino/setup-task@v1 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + - name: Assemble + run: task jvmAssemble + - name: Publish Release + if: ${{ github.ref == 'refs/heads/main' }} + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: task jvmPublishRelease + - name: Publish Snapshot + if: ${{ github.ref != 'refs/heads/main' }} + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: task jvmPublishSnapshot VERSION=$(cat version)-SNAPSHOT-${{ github.run_number }}-${{ github.run_attempt }} + release-python-client: + needs: release-plugin + runs-on: + - ubuntu-22.04 + timeout-minutes: 10 + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 # Needed for git-based changelog. + - uses: actions/setup-python@v4 + with: + python-version: '3.10.8' + cache: 'pip' + - uses: arduino/setup-task@v1 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + - name: Setup pypirc file + env: + TESTPYPI_TOKEN: ${{ secrets.TESTPYPI_TOKEN }} + PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} + run: envsubst < .github/workflows/pypirc.template > $HOME/.pypirc + - name: Setup Setuptools + run: python3 -m pip install setuptools + - name: Publish to pypi.org + if: ${{ github.ref == 'refs/heads/main' }} + run: task pyPublishRelease + - name: Publish to test.pypi.org + if: ${{ github.ref != 'refs/heads/main' }} + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: task pyPublishSnapshot VERSION=$(cat version)-dev-${{ github.run_number }}-${{ github.run_attempt }} release-docs: + needs: release-python-client if: ${{ github.ref == 'refs/heads/main' }} runs-on: - ubuntu-22.04 @@ -45,37 +105,3 @@ jobs: - name: Deploy to GitHub Pages id: deployment uses: actions/deploy-pages@v1 - - release: - runs-on: - - ubuntu-22.04 - timeout-minutes: 60 - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 # Needed for git-based changelog. - - uses: actions/setup-python@v4 - with: - python-version: '3.10.8' - cache: 'pip' - - uses: actions/setup-java@v3 - with: - distribution: 'adopt' - java-version: 19 - cache: 'sbt' - - uses: arduino/setup-task@v1 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - - name: Setup pypirc file - env: - TESTPYPI_TOKEN: ${{ secrets.TESTPYPI_TOKEN }} - PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} - run: envsubst < .github/workflows/pypirc.template > $HOME/.pypirc - - name: Setup Setuptools - run: python3 -m pip install setuptools - - name: Publish to PyPi - run: task pyPublishRelease - - name: Publish to Github - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: task jvmPublishRelease