@@ -55,35 +55,60 @@ jobs:
5555 - name : Extract version from pyproject.toml
5656 id : extract-version
5757 run : |
58- VERSION=$(grep '^version = ' pyproject.toml | sed 's/version = "\(.*\)"/\1/')
59- echo "Extracted version from pyproject.toml: $VERSION"
60- echo "version=$VERSION" >> $GITHUB_OUTPUT
61- echo "tag=council-v$VERSION" >> $GITHUB_OUTPUT
58+ BASE_VERSION=$(grep '^version = ' pyproject.toml | sed 's/version = "\(.*\)"/\1/')
59+ echo "version=$BASE_VERSION" >> $GITHUB_OUTPUT
60+
61+ - name : Get next canary number for testnet
62+ id : canary-number
63+ if : inputs.environment == 'testnet'
64+ run : |
65+ BASE_VERSION="${{ steps.extract-version.outputs.version }}"
66+ CANARY_TAGS=$(git tag -l "council-v${BASE_VERSION}.canary.*" | sort -V)
67+ if [ -z "$CANARY_TAGS" ]; then
68+ CANARY_NUM=1
69+ else
70+ LATEST_CANARY=$(echo "$CANARY_TAGS" | tail -1)
71+ CANARY_NUM=$(echo "$LATEST_CANARY" | sed "s/council-v${BASE_VERSION}\.canary\.\([0-9]*\)/\1/")
72+ CANARY_NUM=$((CANARY_NUM + 1))
73+ fi
74+ echo "number=$CANARY_NUM" >> $GITHUB_OUTPUT
75+
76+ - name : Set release tag
77+ id : set-tag
78+ run : |
79+ BASE_VERSION="${{ steps.extract-version.outputs.version }}"
80+ if [ "${{ inputs.environment }}" == "testnet" ]; then
81+ TAG="council-v${BASE_VERSION}.canary.${{ steps.canary-number.outputs.number }}"
82+ else
83+ TAG="council-v${BASE_VERSION}-${{ inputs.environment }}"
84+ fi
85+ echo "tag=$TAG" >> $GITHUB_OUTPUT
86+ echo "tag=$TAG" >> $GITHUB_ENV
6287
6388 - name : Create council release tag
6489 run : |
65- git tag -a "${{ steps.extract-version.outputs.tag }}" -m "Council Release ${{ steps.extract-version.outputs.version }}"
66- git push origin "${{ steps.extract-version.outputs.tag }}"
90+ TAG="${{ steps.set-tag.outputs.tag }}"
91+ git tag -a "$TAG" -m "Council Release $TAG"
92+ git push origin "$TAG"
6793
6894 - name : Create GitHub council release
6995 uses : softprops/action-gh-release@v2
7096 with :
7197 token : ${{ steps.app-token.outputs.token }}
72- tag_name : ${{ steps.extract-version .outputs.tag }}
73- name : Council Release ${{ steps.extract-version .outputs.version }}
98+ tag_name : ${{ steps.set-tag .outputs.tag }}
99+ name : Council Release ${{ steps.set-tag .outputs.tag }}
74100 body : |
75- 🚀 **Council Contract Release ${{ steps.extract-version .outputs.version }}**
101+ 🚀 **Council Contract Release ${{ steps.set-tag .outputs.tag }}**
76102
77- This is a manual release of the Council contract.
103+ This ${{ inputs.environment == 'testnet' && 'canary' || '' }} release has been manually deployed to Algorand ${{ inputs.environment == 'testnet' && 'Testnet' || 'Mainnet' }}
78104
79105 ## Deployment
80- - **Environment**: ${{ inputs.environment }}
81106 - **Registry App ID**: ${{ inputs.registry_app_id || 'from environment variable' }}
82107
83108 ## Changes
84109 This release includes the latest Council contract updates.
85110
86- **✅ Note**: This release was manually triggered and deployed to ${{ inputs.environment }}.
111+ ${{ inputs.environment == 'testnet' && '**⚠️ Note**: This is a canary release for testing purposes. Not suitable for production use.' || '' }}
87112 draft : false
88113 prerelease : ${{ inputs.environment == 'testnet' }}
89114
@@ -101,8 +126,6 @@ jobs:
101126 - name : Deploy council to ${{ inputs.environment }}
102127 run : algokit project deploy ${{ inputs.environment }} council
103128 env :
104- # Council-specific deployment configuration
105- COUNCIL_DEPLOY_COMMAND : deploy
106129 # Registry app ID - use input if provided, otherwise fall back to environment variable
107130 XGOV_REGISTRY_APP_ID : ${{ inputs.registry_app_id || (inputs.environment == 'mainnet' && vars.XGOV_REGISTRY_APP_ID_MAINNET) || (inputs.environment == 'testnet' && vars.XGOV_REGISTRY_APP_ID_TESTNET) || (inputs.environment == 'localnet' && vars.XGOV_REGISTRY_APP_ID_LOCALNET) || '' }}
108131 # Mainnet Vault configuration for transaction signing
0 commit comments