Skip to content

Commit

Permalink
testing
Browse files Browse the repository at this point in the history
  • Loading branch information
ctran88 committed Jan 16, 2025
1 parent 0002a47 commit 6d1be3c
Showing 1 changed file with 12 additions and 20 deletions.
32 changes: 12 additions & 20 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
workflow_call:
push:
branches:
- main
- test-tagging

permissions:
contents: write
Expand All @@ -15,30 +15,22 @@ jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: googleapis/release-please-action@v4
with:
token: ${{ secrets.BE_SDK_PAT }}
id: release
# - uses: googleapis/release-please-action@v4
# with:
# token: ${{ secrets.BE_SDK_PAT }}
# id: release
- uses: actions/checkout@v4
if: ${{ steps.release.outputs.release_created }}
# if: ${{ steps.release.outputs.release_created }}
- uses: dtolnay/rust-toolchain@stable
if: ${{ steps.release.outputs.release_created }}
# 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
# if: ${{ steps.release.outputs.release_created }}
# 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).* }}
# if: ${{ steps.release.outputs.release_created && fromJSON(steps.publish-crates.outputs.published).* }}
if: ${{ 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"

0 comments on commit 6d1be3c

Please sign in to comment.