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

ci: use checkout with fetch-depth 0 #313

Merged
merged 3 commits into from
Jul 8, 2024
Merged
Show file tree
Hide file tree
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
6 changes: 3 additions & 3 deletions .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ jobs:
- windows-latest
steps:
- uses: actions/checkout@v4

- name: Fetch all history for all tags and branches (necessary for setuptools_scm)
run: git fetch --prune --unshallow
with:
fetch-depth: 0 # Fetch all history for all tags and branches (necessary for setuptools_scm)

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip

- name: Install ubuntu dependencies
if: matrix.os == 'ubuntu-latest'
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Deploy Package

on: [push]
on:
push:
tags:
- v*.*.*

jobs:
build-n-publish:
Expand All @@ -9,9 +12,8 @@ jobs:

steps:
- uses: actions/checkout@v4

- name: Fetch all history for all tags and branches (necessary for setuptools_scm)
run: git fetch --prune --unshallow
with:
fetch-depth: 0 # Fetch all history for all tags and branches (necessary for setuptools_scm)

- name: Set up Python 3.9
uses: actions/setup-python@v5
Expand All @@ -34,7 +36,6 @@ jobs:
.

- name: Publish distribution 📦 to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/gh-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,10 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Fetch all history for all tags and branches (necessary for setuptools_scm)
run: git fetch --prune --unshallow
with:
fetch-depth: 0 # Fetch all history for all tags and branches (necessary for setuptools_scm)
afuetterer marked this conversation as resolved.
Show resolved Hide resolved

- name: Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
generate_release_notes: true