v2.2.0 #26
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Slack Post | |
| on: | |
| workflow_dispatch: # Manual trigger | |
| inputs: | |
| github_ref: | |
| description: 'Manually provided value for GITHUB_RELEASE_TAG of a release' | |
| required: true | |
| type: string | |
| # https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#release | |
| release: | |
| types: [published] | |
| jobs: | |
| build: | |
| name: Slack Post | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: 'Checkout' | |
| uses: actions/checkout@v3 | |
| - run: | | |
| if [[ ${{ github.event_name == 'workflow_dispatch' }} == true ]]; then | |
| export GITHUB_RELEASE_TAG=${{ inputs.github_ref }} | |
| else # release event | |
| export GITHUB_RELEASE_TAG=$(basename ${GITHUB_REF}) | |
| fi | |
| echo "New release published ${GITHUB_RELEASE_TAG}" | |
| pip3 install httpx PyGithub | |
| echo $PWD | |
| ls -lah | |
| python ./.github/scripts/announce_release_on_slack.py | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| SLACK_TOKEN: ${{ secrets.RUPY_TRACER_RELEASES_TOKEN }} | |
| SLACK_SERVICE: ${{ secrets.RUPY_TRACER_RELEASES_SERVICE_ID }} | |
| SLACK_TEAM: ${{ secrets.RUPY_TOWN_CRIER_TEAM_ID }} | |