|
|
|
@ -37,7 +37,16 @@ jobs: |
|
|
|
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 |
|
|
|
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 |
|
|
|
with: |
|
|
|
with: |
|
|
|
ref: main |
|
|
|
ref: main |
|
|
|
repository: bitwarden/key-connector |
|
|
|
|
|
|
|
|
|
|
|
- name: Check if RC branch exists |
|
|
|
|
|
|
|
if: ${{ inputs.cut_rc_branch == true }} |
|
|
|
|
|
|
|
run: | |
|
|
|
|
|
|
|
remote_rc_branch_check=$(git ls-remote --heads origin rc | wc -l) |
|
|
|
|
|
|
|
if [[ "${remote_rc_branch_check}" -gt 0 ]]; then |
|
|
|
|
|
|
|
echo "Remote RC branch exists." |
|
|
|
|
|
|
|
echo "Please delete current RC branch before running again." |
|
|
|
|
|
|
|
exit 1 |
|
|
|
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
- name: Import GPG key |
|
|
|
- name: Import GPG key |
|
|
|
uses: crazy-max/ghaction-import-gpg@01dd5d3ca463c7f10f7f4f7b4f177225ac661ee4 # v6.1.0 |
|
|
|
uses: crazy-max/ghaction-import-gpg@01dd5d3ca463c7f10f7f4f7b4f177225ac661ee4 # v6.1.0 |
|
|
|
@ -157,14 +166,19 @@ jobs: |
|
|
|
with: |
|
|
|
with: |
|
|
|
ref: main |
|
|
|
ref: main |
|
|
|
|
|
|
|
|
|
|
|
- name: Check if RC branch exists |
|
|
|
- name: Verify version has been updated |
|
|
|
|
|
|
|
env: |
|
|
|
|
|
|
|
NEW_VERSION: ${{ inputs.version_number }} |
|
|
|
run: | |
|
|
|
run: | |
|
|
|
remote_rc_branch_check=$(git ls-remote --heads origin rc | wc -l) |
|
|
|
CURRENT_VERSION=$(xmllint -xpath "/Project/PropertyGroup/Version/text()" src/KeyConnector/KeyConnector.csproj) |
|
|
|
if [[ "${remote_rc_branch_check}" -gt 0 ]]; then |
|
|
|
|
|
|
|
echo "Remote RC branch exists." |
|
|
|
# Wait for version to change. |
|
|
|
echo "Please delete current RC branch before running again." |
|
|
|
while [[ "$NEW_VERSION" != "$CURRENT_VERSION" ]] |
|
|
|
exit 1 |
|
|
|
do |
|
|
|
fi |
|
|
|
echo "Waiting for version to be updated..." |
|
|
|
|
|
|
|
sleep 10 |
|
|
|
|
|
|
|
git pull --force |
|
|
|
|
|
|
|
done |
|
|
|
|
|
|
|
|
|
|
|
- name: Cut RC branch |
|
|
|
- name: Cut RC branch |
|
|
|
run: | |
|
|
|
run: | |
|
|
|
|