From 578f5cc97b9a8f41626906ccdec80648795b803a Mon Sep 17 00:00:00 2001 From: Ihsan Ullah Date: Mon, 12 May 2025 15:51:15 +0500 Subject: [PATCH] version update workflow removed --- .github/workflows/release-version-update.yml | 69 -------------------- 1 file changed, 69 deletions(-) delete mode 100644 .github/workflows/release-version-update.yml diff --git a/.github/workflows/release-version-update.yml b/.github/workflows/release-version-update.yml deleted file mode 100644 index a5eebaabe..000000000 --- a/.github/workflows/release-version-update.yml +++ /dev/null @@ -1,69 +0,0 @@ -name: Update version.json and create PR - -# Trigger the github action when a new release is published -on: - release: - types: [published] - -jobs: - update-version: - runs-on: ubuntu-latest - - steps: - - # Step 1: Checkout repository - - name: Checkout repository - uses: actions/checkout@v3 - - # Step 2: Get latest release version information - - name: Get release information - id: get_release - run: | - response=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" https://api.github.com/repos/${{ github.repository }}/releases/latest) - echo "$response" | jq '.tag_name, .name, .published_at, .html_url' | tee /tmp/release_info - echo "tag_name=$(echo "$response" | jq -r .tag_name)" >> $GITHUB_ENV - echo "name=$(echo "$response" | jq -r .name)" >> $GITHUB_ENV - echo "published_at=$(echo "$response" | jq -r .published_at)" >> $GITHUB_ENV - echo "html_url=$(echo "$response" | jq -r .html_url)" >> $GITHUB_ENV - - # Step 3: Update version.json file with latest information - - name: Update version.json - run: | - echo '{ - "tag_name": "${{ env.tag_name }}", - "release_name": "${{ env.name }}", - "published_at": "${{ env.published_at }}", - "html_url": "${{ env.html_url }}" - }' > version.json - - # Step 4: Configure a user to create a branch and then push changes - - name: Configure Git user - run: | - git config --global user.name "GitHub Actions" - git config --global user.email "actions@github.com" - - # Step 5: Create a new branch for version updates - - name: Create new branch - run: | - git checkout -b update-version-${{ env.tag_name }} - git add version.json - git commit -m "Update version.json for release ${{ env.tag_name }}" - - # Step 6: Push branch - - name: Push branch - run: | - git push origin update-version-${{ env.tag_name }} - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - # Step 7: Create a pull request from the pushed branch - - name: Create Pull Request - run: | - curl -X POST -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -H "Accept: application/vnd.github.v3+json" \ - https://api.github.com/repos/${{ github.repository }}/pulls \ - -d '{ - "title": "[RELEASE ${{ env.tag_name }}] Update version.json for release ${{ env.tag_name }}", - "body": "This PR updates version.json with the latest release information: ${{ env.tag_name }}", - "head": "update-version-${{ env.tag_name }}", - "base": "develop" - }'