Files
php-curl-class/.github/workflows/release.yml
T
Zach Borboa b5e90e45a9 Fix release failure by fetching all tags during checkout
Command:
  for remote in local_repo.remotes:
      remote.fetch('--tags')

Error message:
  git.exc.GitCommandError: Cmd('git') failed due to: exit code(128)
    cmdline: git fetch -v -- origin --tags
    stderr: 'fatal: couldn't find remote ref --tags'

Before:
    Fetching the repository
    /usr/bin/git -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 origin [...]

After:
    Fetching the repository
    /usr/bin/git -c protocol.version=2 fetch --prune --progress --no-recurse-submodules origin [...]
2022-12-30 18:03:02 -08:00

34 lines
846 B
YAML

name: release
on:
schedule:
- cron: '0 1 * * *'
workflow_dispatch:
jobs:
release:
# Prevent this workflow from running elsewhere.
if: github.repository_owner == 'php-curl-class'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install requirements
run: |
python -m pip install --upgrade pip
pip install --requirement scripts/make_release_requirements.txt
- name: Set git details
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
- name: Make release
run: python scripts/make_release.py
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}