Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a wait for response from pypi before building and pushing the doc… #21

Merged
merged 1 commit into from
Apr 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 19 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
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