chore(deps): update actions/checkout digest to 93cb6ef (#534) #441
This file contains hidden or 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: release | |
| on: | |
| push: | |
| branches: | |
| - main | |
| env: | |
| PYTHON_VERSION: '3.10' | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5 | |
| - name: Install uv and set the python version | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| python-version: ${{ env.PYTHON_VERSION }} | |
| - name: Install required dependencies | |
| run: | | |
| uv sync --all-extras | |
| - name: Linting and static code checks | |
| run: uv run pre-commit run --all-files | |
| release: | |
| runs-on: ubuntu-latest | |
| environment: CD | |
| steps: | |
| - uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install uv and set the python version | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| python-version: ${{ env.PYTHON_VERSION }} | |
| - name: Install required dependencies | |
| run: | | |
| uv sync --all-extras | |
| - name: Dump last commit message to file | |
| run: git log -1 --pretty=%B > last_git_message.txt | |
| - name: Dump last tag to file | |
| run: git describe --tags --abbrev=0 > last_version.txt | |
| - name: Bump Version | |
| run: uv run python dev.py bump --verbose | |
| - id: version | |
| name: Read the new version | |
| # Read the version from the cognite/pygen/_version.py file | |
| run: echo "version=$(sed -n 's/^__version__ = "\(.*\)"/\1/p' cognite/pygen/_version.py)" >> $GITHUB_ENV | |
| - name: Create CHANGELOG entry | |
| if: env.version != '0.0.0' | |
| run: uv run python dev.py changelog | |
| - name: Build package | |
| if: env.version != '0.0.0' | |
| run: uv build | |
| - name: Release to PyPI | |
| if: env.version != '0.0.0' | |
| env: | |
| TWINE_USERNAME: __token__ | |
| TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} | |
| run: uv run twine upload --skip-existing --verbose dist/* | |
| - name: Add entry to CHANGELOG | |
| if: env.version != '0.0.0' | |
| uses: ncipollo/release-action@v1 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| prerelease: false | |
| draft: false | |
| tag: ${{ env.version }} | |
| bodyFile: last_changelog_entry.md |