Skip to content

Commit

Permalink
Update origin / Refactor / Comments
Browse files Browse the repository at this point in the history
Signed-off-by: jamshale <jamiehalebc@gmail.com>
  • Loading branch information
jamshale committed Apr 22, 2024
1 parent 5187a1d commit 0f7d205
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 12 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/ReleaseWorkflows.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ title: Create Release Workflow
flowchart TB
Start[Create Release] --> OnPushMain[On Push to Main]
OnPushMain --> GetACAPYRelease[Get latest ACA-PY Release via PIP]
GetACAPYRelease --> CheckChangeSet{Check ACAPY Version in Change Set}
OnPushMain --> CheckChangeSet{Check ACAPY Version in Change Set}
CheckChangeSet --> |No updated lock files| End
CheckChangeSet --> |Updated lock files| ConfigureGit[Configure Git]
ConfigureGit --> GetReleaseTags[Get Release Tags - Based on ACA-PY Version]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/create-release-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ jobs:
git config --global user.name 'Release Bot'
git config --global user.email 'release-bot@users.noreply.github.com'
git remote set-url --push origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/jamshale/aries-acapy-plugins
git remote set-url --push origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/hyperledger/aries-acapy-plugins
git fetch --all
git checkout -b "release-v$release_version"
Expand Down
26 changes: 17 additions & 9 deletions .github/workflows/create-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ jobs:
permissions: write-all
runs-on: ubuntu-latest
outputs:
current_available_version: ${{ steps.current_available_version.outputs.version }}
should_create_release: ${{ steps.should_create_release.outputs.should_create_release }}
defaults:
run:
Expand All @@ -24,16 +23,15 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get latest aries-cloudagent version
id: current_available_version
run: |
remote_version=$(pip index versions aries-cloudagent)
version=$(grep -oP '(?<=Available versions: ).*?(?=,)' <<< "$remote_version")
echo current_available_version=$version >> $GITHUB_OUTPUT
echo "Remote version = $version"
# ----------------------------------------------
# Install Python
# ----------------------------------------------
- uses: actions/setup-python@v5
with:
python-version: '3.9'
# ----------------------------------------------
# Check if a release should be created
# ----------------------------------------------
- name: Check If Release Should Be Created
id: should_create_release
run: |
Expand All @@ -45,6 +43,9 @@ jobs:
echo "${upgraded_plugins}"
# Check if any of the changed files are poetry.lock files
# and if they not match the global poetry.lock file
for file in ${get_changed_files}; do
if [[ $file == *"/poetry.lock"* ]] && [[ $file != *"integration/poetry.lock"* ]]; then
for plugin in ${upgraded_plugins}; do
Expand All @@ -63,6 +64,9 @@ jobs:
echo "No Upgrade Detected. Skipping Release Creation."
fi
echo should_create_release=$found_upgrade >> $GITHUB_OUTPUT
# ----------------------------------------------
# Create Release
# ----------------------------------------------
- name: Create Release
if: steps.should_create_release.outputs.should_create_release == 'true'
env:
Expand All @@ -75,9 +79,11 @@ jobs:
git config --global user.name 'Release Bot'
git config --global user.email 'release-bot@users.noreply.github.com'
git remote set-url --push origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/jamshale/aries-acapy-plugins
git remote set-url --push origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/hyperledger/aries-acapy-plugins
git fetch --tags
# Determine the release tag
get_tags_output=$(git tag -n0 "*$version*")
echo "Tag output:"
echo "${get_tags_output}"
Expand All @@ -97,6 +103,8 @@ jobs:
release_tag="$version.$tags_num"
fi
# Get the release notes
body=$(python repo_manager.py 4)
details="Plugins upgraded this release: "
Expand Down

0 comments on commit 0f7d205

Please sign in to comment.