Skip to content

Commit d2184c2

Browse files
committed
fix workflow
1 parent b9ec06f commit d2184c2

1 file changed

Lines changed: 22 additions & 17 deletions

File tree

.github/workflows/release.yml

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -38,19 +38,23 @@ jobs:
3838

3939
release:
4040
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
41+
needs: build
42+
runs-on: ubuntu-latest
43+
steps:
44+
- name: Release
45+
uses: softprops/action-gh-release@v2
46+
with:
47+
# Use GH feature to populate the changelog automatically
48+
generate_release_notes: true
49+
body_path: release_notes.txt
50+
prerelease: ${{ contains(github.ref, '-rc') }}
51+
fail_on_unmatched_files: true
52+
files: rules_python-*.tar.gz
4953

5054
publish_bcr:
5155
name: Publish to BCR
5256
needs: release
53-
uses: .github/workflows/publish.yaml
57+
uses: ./.github/workflows/publish.yaml@${{ github.sha }}
5458
with:
5559
tag_name: ${{ github.ref_name }}
5660
secrets:
@@ -61,11 +65,12 @@ jobs:
6165
name: Publish runfiles to PyPI
6266
needs: publish_bcr
6367
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
68+
steps:
69+
- if: github.event_name == 'push' || github.event.inputs.publish_to_pypi
70+
env:
71+
# This special value tells pypi that the user identity is supplied within the token
72+
TWINE_USERNAME: __token__
73+
# Note, the PYPI_API_TOKEN is for the rules-python pypi user, added by @rickylev on
74+
# https://github.com/bazel-contrib/rules_python/settings/secrets/actions
75+
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
76+
run: bazel run --stamp --embed_label=${{ github.ref_name }} //python/runfiles:wheel.publish

0 commit comments

Comments
 (0)