Update pymongo note (#667) #475
This file contains 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
name: Build & Publish Collection | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build_publish: | |
runs-on: ubuntu-20.04 | |
defaults: | |
run: | |
working-directory: ansible_collections/community/mongodb | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
with: | |
path: ansible_collections/community/mongodb | |
- name: Set up Python 3.12 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
- name: Install ansible-base (devel) | |
run: pip install https://github.com/ansible/ansible/archive/devel.tar.gz --disable-pip-version-check | |
- name: Build the collection | |
run: ansible-galaxy collection build | |
- name: Rename the build artifact | |
run: mv community-mongodb-*.tar.gz community-mongodb-latest.tar.gz | |
- name: Upload community-mongodb-latest.tar.gz as an artifact | |
uses: actions/upload-artifact@v1 | |
with: | |
name: community-mongodb-latest | |
path: ansible_collections/community/mongodb/community-mongodb-latest.tar.gz | |
# Moving the tag leaves an orphan artifact. Just changing the artifact doesn't move the tag. | |
- name: Delete latest tag and release | |
uses: dev-drprasad/delete-tag-and-release@v1.0.1 | |
with: | |
delete_release: true | |
tag_name: latest | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Upload files to release | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: ansible_collections/community/mongodb/community-mongodb-latest.tar.gz | |
asset_name: community-mongodb-latest.tar.gz | |
body: "Development release" | |
tag: latest | |
overwrite: true |