Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโ€™ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BRE-341 - Update Publish PHP workflow #1074

Merged
merged 1 commit into from
Sep 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading