diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6c47b28..cb4c1e0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,7 +5,7 @@ on: workflow_call: push: branches: - - main + - fix-tagging-step-condition-check permissions: contents: write @@ -15,30 +15,19 @@ jobs: release: runs-on: ubuntu-latest steps: - - uses: googleapis/release-please-action@v4 - with: - token: ${{ secrets.BE_SDK_PAT }} - id: release - uses: actions/checkout@v4 - if: ${{ steps.release.outputs.release_created }} - uses: dtolnay/rust-toolchain@stable - if: ${{ steps.release.outputs.release_created }} - uses: katyo/publish-crates@v2 with: registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }} - if: ${{ steps.release.outputs.release_created }} + dry-run: true + check-repo: false + no-verify: true + id: publish-crates # https://github.com/googleapis/release-please-action?tab=readme-ov-file#creating-majorminor-tags - name: Tag versions - if: ${{ steps.release.outputs.release_created && fromJSON(steps.publish-crates.outputs.published).* }} run: | - git config user.name github-actions[bot] - git config user.email 41898282+github-actions[bot]@users.noreply.github.com - git remote add gh-token "https://${{ secrets.GITHUB_TOKEN }}@github.com/googleapis/release-please-action.git" - git tag -d v${{ steps.release.outputs.major }} || true - git tag -d v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} || true - git push origin :v${{ steps.release.outputs.major }} || true - git push origin :v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} || true - git tag -a v${{ steps.release.outputs.major }} -m "Release v${{ steps.release.outputs.major }}" - git tag -a v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} -m "Release v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}" - git push origin v${{ steps.release.outputs.major }} - git push origin v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} + echo "Tagging versions" + echo "published: ${{ steps.publish-crates.outputs.published }}" + echo "conclusion: ${{ steps.publish-crates.conclusion }}" + echo "outcome: ${{ steps.publish-crates.outcome }}"