diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ffed56d6..61fee78c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -34,26 +34,35 @@ jobs: poetry publish --build --username __token__ --password "${PYPI_TOKEN}" - name: Set VERSION environment variable + id: set-version shell: micromamba-shell {0} - run: echo "VERSION=$(poetry version --short)" >> $GITHUB_ENV - - - name: Build and publish Docker image - shell: micromamba-shell {0} - env: - DOCKER_HUB_USERNAME: ${{ secrets.DOCKER_HUB_USERNAME }} - DOCKER_HUB_PUSH_TOKEN: ${{ secrets.DOCKER_HUB_PUSH_TOKEN }} - run: make build-and-publish-dockerhub-image + run: echo "VERSION=$(poetry version --short)" >> $GITHUB_OUTPUT - name: Create tag shell: micromamba-shell {0} env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - git tag v$VERSION + git tag v${{ steps.set-version.outputs.VERSION }} git push origin --tags - name: Create Github release shell: micromamba-shell {0} env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: gh release create v$VERSION --generate-notes + run: gh release create v${{ steps.set-version.outputs.VERSION }} --generate-notes + + - name: Wait for Pypi version to be available + uses: cygnetdigital/wait_for_response@v2.0.0 + with: + url: 'https://pypi.org/project/copernicusmarine/${{ steps.set-version.outputs.VERSION }}/' + responseCode: '200' + timeout: 600000 + interval: 5000 + + - name: Build and publish Docker image + shell: micromamba-shell {0} + env: + DOCKER_HUB_USERNAME: ${{ secrets.DOCKER_HUB_USERNAME }} + DOCKER_HUB_PUSH_TOKEN: ${{ secrets.DOCKER_HUB_PUSH_TOKEN }} + run: make build-and-publish-dockerhub-image