chore(deps): bump codecov/codecov-action from 4 to 5 in the ci-depend… #35
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: Push Events | |
on: | |
push: | |
branches: | |
- main | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
release-please: | |
name: Create release | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
pull-requests: write | |
outputs: | |
release_created: ${{ steps.release-please.outputs.release_created }} | |
steps: | |
- name: 🚀 Create Release | |
id: release-please | |
uses: agrc/release-composite-action@v1 | |
with: | |
release-type: python | |
prerelease: ${{ github.ref_name == 'dev' }} | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
github-app-id: ${{ secrets.UGRC_RELEASE_BOT_APP_ID }} | |
github-app-key: ${{ secrets.UGRC_RELEASE_BOT_APP_KEY }} | |
github-app-name: ${{ secrets.UGRC_RELEASE_BOT_NAME }} | |
github-app-email: ${{ secrets.UGRC_RELEASE_BOT_EMAIL }} | |
deploy-prod: | |
runs-on: ubuntu-latest | |
needs: release-please | |
if: github.ref == 'refs/heads/main' && needs.release-please.outputs.release_created | |
environment: | |
name: prod | |
url: https://pypi.org/project/ugrc-sweeper/ | |
permissions: | |
id-token: write | |
steps: | |
- name: ⬇️ Set up code | |
uses: actions/checkout@v4 | |
with: | |
show-progress: false | |
- name: 🐍 Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
cache: pip | |
cache-dependency-path: setup.py | |
- name: 🛞 Install wheel | |
run: pip install wheel | |
- name: 📦 Build package | |
run: python setup.py sdist bdist_wheel | |
- name: 🚀 Publish to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
upload-coverage: | |
runs-on: ubuntu-latest | |
needs: deploy-prod | |
steps: | |
- name: ⬇️ Set up code | |
uses: actions/checkout@v4 | |
with: | |
show-progress: false | |
- name: 🐍 Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
cache: pip | |
cache-dependency-path: setup.py | |
- name: 🏗 Install module | |
run: pip install .[tests] | |
- name: ⚙️ Add config file | |
run: cp config.sample.json config.json | |
- name: 🧪 Run tests | |
run: pytest | |
- name: ⬆️ Upload coverage to Codecov | |
uses: codecov/codecov-action@v5 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: ./cov.xml |