7272 environment : ${{ needs.resolve-deploy-type.outputs.environment }}
7373 permissions :
7474 contents : write
75+ outputs :
76+ artifact_name : ${{ steps.artifact.outputs.artifact_name }}
77+ release_tag : ${{ steps.prev_tag.outputs.current_tag }}
78+ artifact_link : ${{ steps.artifact-link.outputs.artifact_link }}
7579 env :
7680 DEFAULT_NETWORK : ${{ secrets[needs.resolve-deploy-type.outputs.default_network_secret] }}
7781 IOTA_NETWORKS : ${{ secrets[needs.resolve-deploy-type.outputs.iota_networks_secret] }}
99103 with :
100104 path : apps/wallet
101105 - name : Create artifact name
106+ id : artifact
102107 shell : bash
103108 run : |
104109 if [ "$DEPLOY_TYPE" = "rc" ]; then
@@ -107,6 +112,7 @@ jobs:
107112 export artifact_name="iota-wallet-${{ steps.package-version.outputs.current-version }}"
108113 fi
109114 echo "artifact_name=${artifact_name}" >> $GITHUB_ENV
115+ echo "artifact_name=${artifact_name}" >> $GITHUB_OUTPUT
110116 - name : Get Previous Tag
111117 if : env.DEPLOY_TYPE == 'production'
112118 id : prev_tag
@@ -121,6 +127,7 @@ jobs:
121127 echo "PREV_TAG=$prev_tag" >> $GITHUB_ENV
122128 fi
123129 echo "CURRENT_TAG=$current_tag" >> $GITHUB_ENV
130+ echo "current_tag=$current_tag" >> $GITHUB_OUTPUT
124131 - name : Generate Changelog
125132 if : env.DEPLOY_TYPE == 'production'
126133 id : generate_changelog
@@ -174,3 +181,29 @@ jobs:
174181 draft : true
175182 prerelease : false
176183 body_path : CHANGELOG.md
184+
185+ - name : Compose artifact link for Slack
186+ id : artifact-link
187+ if : always()
188+ shell : bash
189+ run : |
190+ if [ "$DEPLOY_TYPE" = "production" ]; then
191+ echo "artifact_link=Release: ${{ github.server_url }}/${{ github.repository }}/releases/tag/${CURRENT_TAG}" >> "$GITHUB_OUTPUT"
192+ else
193+ echo "artifact_link=Artifacts: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}#artifacts" >> "$GITHUB_OUTPUT"
194+ fi
195+
196+ notify :
197+ needs : [resolve-deploy-type, wallet-build]
198+ if : always() && needs.wallet-build.result != 'skipped' && (needs.resolve-deploy-type.outputs.deploy_type == 'rc' || needs.resolve-deploy-type.outputs.deploy_type == 'production')
199+ uses : ./.github/workflows/_slack_notify.yml
200+ secrets : inherit
201+ with :
202+ status : ${{ needs.wallet-build.result == 'success' && 'success' || 'failure' }}
203+ title : " Wallet ${{ needs.resolve-deploy-type.outputs.deploy_type }} build ${{ needs.wallet-build.result }}"
204+ message : |
205+ Environment: ${{ needs.resolve-deploy-type.outputs.deploy_type }}
206+ Artifact: ${{ needs.wallet-build.outputs.artifact_name }}
207+ ${{ needs.wallet-build.outputs.artifact_link }}
208+ Workflow Run: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
209+
0 commit comments