Skip to content

Commit

Permalink
BRE-341 - Update Publish PHP workflow (#1074)
Browse files Browse the repository at this point in the history
  • Loading branch information
vgrassia authored Sep 23, 2024
1 parent 7ff270d commit 56fc75d
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions .github/workflows/publish-php.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: Publish PHP SDK
run-name: Publish PHP SDK ${{ inputs.release_type }}

Expand Down Expand Up @@ -29,9 +30,9 @@ jobs:
- name: Branch check
if: ${{ inputs.release_type != 'Dry Run' }}
run: |
if [[ "$GITHUB_REF" != "refs/heads/rc" ]] && [[ "$GITHUB_REF" != "refs/heads/hotfix-rc" ]]; then
if [[ "$GITHUB_REF" != "refs/heads/main" ]]; then
echo "==================================="
echo "[!] Can only release from the 'rc' or 'hotfix-rc' branches"
echo "[!] Can only release from the 'main' branch"
echo "==================================="
exit 1
fi
Expand Down Expand Up @@ -123,7 +124,7 @@ jobs:
working-directory: sm-sdk-php
run: |
git add .
git commit -m "Update Go SDK to ${{ github.sha }}"
git commit -m "Update PHP SDK to ${{ github.sha }}"
if [[ "${{ inputs.release_type }}" == "Dry Run" ]]; then
echo "==================================="
Expand All @@ -135,7 +136,7 @@ jobs:
git push origin main
fi
- name: Create release tag on SDK Go repo
- name: Create release tag on PHP SDK repo
if: ${{ inputs.release_type != 'Dry Run' }}
working-directory: sm-sdk-php
run: |
Expand Down Expand Up @@ -177,7 +178,7 @@ jobs:
with:
workflow: build-rust-cross-platform.yml
workflow_conclusion: success
branch: ${{ inputs.release_type == 'Dry Run' && 'main' || github.ref_name }}
branch: main
artifacts: libbitwarden_c_files-x86_64-apple-darwin
skip_unpack: true

Expand All @@ -186,7 +187,7 @@ jobs:
with:
workflow: build-rust-cross-platform.yml
workflow_conclusion: success
branch: ${{ inputs.release_type == 'Dry Run' && 'main' || github.ref_name }}
branch: main
artifacts: libbitwarden_c_files-aarch64-apple-darwin
skip_unpack: true

Expand All @@ -195,7 +196,7 @@ jobs:
with:
workflow: build-rust-cross-platform.yml
workflow_conclusion: success
branch: ${{ inputs.release_type == 'Dry Run' && 'main' || github.ref_name }}
branch: main
artifacts: libbitwarden_c_files-x86_64-unknown-linux-gnu
skip_unpack: true

Expand All @@ -204,7 +205,7 @@ jobs:
with:
workflow: build-rust-cross-platform.yml
workflow_conclusion: success
branch: ${{ inputs.release_type == 'Dry Run' && 'main' || github.ref_name }}
branch: main
artifacts: libbitwarden_c_files-x86_64-pc-windows-msvc
skip_unpack: true

Expand Down

0 comments on commit 56fc75d

Please sign in to comment.