@@ -35,21 +35,37 @@ jobs:
3535        uses : actions/checkout@v5 
3636      - name : Create release archive and notes 
3737        run : .github/workflows/create_archive_and_notes.sh 
38-       - name : Publish wheel dist 
39-         if : github.event_name == 'push' || github.event.inputs.publish_to_pypi 
40-         env :
41-           #  This special value tells pypi that the user identity is supplied within the token
42-           TWINE_USERNAME : __token__ 
43-           #  Note, the PYPI_API_TOKEN is for the rules-python pypi user, added by @rickylev on
44-           #  https://github.com/bazel-contrib/rules_python/settings/secrets/actions
45-           TWINE_PASSWORD : ${{ secrets.PYPI_API_TOKEN }} 
46-         run : bazel run --stamp --embed_label=${{ github.ref_name }} //python/runfiles:wheel.publish 
47-       - name : Release 
48-         uses : softprops/action-gh-release@v2 
49-         with :
50-           #  Use GH feature to populate the changelog automatically
51-           generate_release_notes : true 
52-           body_path : release_notes.txt 
53-           prerelease : ${{ contains(github.ref, '-rc') }} 
54-           fail_on_unmatched_files : true 
55-           files : rules_python-*.tar.gz 
38+ 
39+   release :
40+     name : Release 
41+     uses : softprops/action-gh-release@v2 
42+     with :
43+       #  Use GH feature to populate the changelog automatically
44+       generate_release_notes : true 
45+       body_path : release_notes.txt 
46+       prerelease : ${{ contains(github.ref, '-rc') }} 
47+       fail_on_unmatched_files : true 
48+       files : rules_python-*.tar.gz 
49+ 
50+   publish_bcr :
51+     name : Publish to BCR 
52+     needs : release 
53+     uses : .github/workflows/publish.yaml 
54+     with :
55+       tag_name : ${{ github.ref_name }} 
56+     secrets :
57+       BCR_PUBLISH_TOKEN : ${{ secrets.BCR_PUBLISH_TOKEN }} 
58+ 
59+   publish_pypi :
60+     #  We just want publish_pypi last, since once uploaded, it can't be changed.
61+     name : Publish runfiles to PyPI 
62+     needs : publish_bcr 
63+     runs-on : ubuntu-latest 
64+     if : github.event_name == 'push' || github.event.inputs.publish_to_pypi 
65+     env :
66+       #  This special value tells pypi that the user identity is supplied within the token
67+       TWINE_USERNAME : __token__ 
68+       #  Note, the PYPI_API_TOKEN is for the rules-python pypi user, added by @rickylev on
69+       #  https://github.com/bazel-contrib/rules_python/settings/secrets/actions
70+       TWINE_PASSWORD : ${{ secrets.PYPI_API_TOKEN }} 
71+     run : bazel run --stamp --embed_label=${{ github.ref_name }} //python/runfiles:wheel.publish 
0 commit comments