Skip to content

Commit

Permalink
Add support for master branch name
Browse files Browse the repository at this point in the history
  • Loading branch information
frankinspace authored Aug 28, 2024
1 parent dfa2622 commit c317123
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/build-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ jobs:
if: |
github.ref != 'refs/heads/develop' &&
github.ref != 'refs/heads/main' &&
github.ref != 'refs/heads/master' &&
!startsWith(github.ref, 'refs/heads/release/')
run: |
new_ver="${{ steps.get-version.outputs.current_version }}+$(git rev-parse --short ${GITHUB_SHA})"
Expand Down Expand Up @@ -105,7 +106,7 @@ jobs:
- name: Release version
# If triggered by push to the main branch
if: |
startsWith(github.ref, 'refs/heads/main') &&
(startsWith(github.ref, 'refs/heads/main') || startsWith(github.ref, 'refs/heads/master')) &&
github.event_name != 'workflow_dispatch'
id: release
env:
Expand Down Expand Up @@ -202,7 +203,8 @@ jobs:
if: |
github.ref == 'refs/heads/develop' ||
startsWith(github.ref, 'refs/heads/release') ||
github.ref == 'refs/heads/main'
github.ref == 'refs/heads/main' ||
github.ref == 'refs/heads/master'
steps:
- name: Download python dist
uses: actions/download-artifact@v4
Expand All @@ -219,6 +221,7 @@ jobs:
repository-url: https://test.pypi.org/legacy/
- name: Publish to pypi.org
if: |
github.ref == 'refs/heads/main'
github.ref == 'refs/heads/main' ||
github.ref == 'refs/heads/master'
id: pypi-publish
uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit c317123

Please sign in to comment.