diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 21f2edb..0703a61 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -58,10 +58,10 @@ jobs: git checkout -b "bump-to-$version" git config user.name "github-actions[bot]" git config user.email "github-actions[bot]@users.noreply.github.com" - git commit -am "bump version to $version" + git commit -am "bump package to $version" git remote set-url origin "https://x-access-token:${GH_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" git push --force origin "bump-to-$version" gh pr create --base main --head "bump-to-$version" \ - --title "chore: bump version to $version" \ + --title "chore: bump package to $version" \ --body "" \ --reviewer dwilding diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 161d5d0..75d663c 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -34,7 +34,6 @@ jobs: set -euo pipefail version="$(uvx --from "$PWD" gimmegit --version)" version="${version#gimmegit }" - echo "Detected version: $version" echo "version=$version" >> "$GITHUB_OUTPUT" release=false if [[ "$version" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then @@ -43,8 +42,6 @@ jobs: fi fi echo "release=$release" >> "$GITHUB_OUTPUT" - echo "GITHUB_OUTPUT file contents:" - cat "$GITHUB_OUTPUT" wait-checks: runs-on: ubuntu-latest @@ -66,33 +63,26 @@ jobs: run: | set -euo pipefail sha="${{ github.sha }}" - run_id="${{ github.run_id }}" - echo "SHA: $sha" - echo "Run ID: $run_id" release=false # Wait for all other workflow runs on this SHA to complete. other_runs="$(gh run list --branch main --limit 50 --json databaseId,headSha --jq ".[] | select(.headSha == \"${sha}\") | .databaseId")" - echo "All runs on this SHA: $other_runs" - other_runs="$(echo "$other_runs" | grep -v "$run_id" || true)" - echo "Other runs (excluding this one): $other_runs" + other_runs="$(echo "$other_runs" | grep -v "${{ github.run_id }}" || true)" all_passed=true for run in $other_runs; do - echo "Watching run $run..." if ! gh run watch "$run" --exit-status >/dev/null 2>&1; then all_passed=false fi done - echo "all_passed=$all_passed" if [[ "$all_passed" == "true" ]]; then release=true fi echo "release=$release" >> "$GITHUB_OUTPUT" - echo "GITHUB_OUTPUT file contents:" - cat "$GITHUB_OUTPUT" create-draft: runs-on: ubuntu-latest - needs: wait-checks + needs: + - check-version + - wait-checks if: needs.wait-checks.outputs.release == 'true' permissions: contents: write @@ -110,11 +100,5 @@ jobs: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | set -euo pipefail - echo "VERSION env: [$VERSION]" - if [[ -z "$VERSION" ]]; then - echo "Error: VERSION is empty" - exit 1 - fi notes="$(uv run --script .github/scripts/write_release_notes.py "$VERSION")" - echo "Notes generated, creating release..." gh release create "$VERSION" --draft --target main --notes "$notes"