File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66 workflow_dispatch :
77
88jobs :
9+ fetch_version :
10+ name : Fetch release version
11+ runs-on : ubuntu-latest
12+
13+ outputs :
14+ version : ${{ steps.get_version.outputs.version }}
15+
16+ steps :
17+ - name : Get the version
18+ id : get_version
19+ run : echo ::set-output name=version::${GITHUB_REF#refs/tags/v}
20+
921 publish_docker_image :
1022 name : Build & Publish Docker image
1123 runs-on : ubuntu-latest
1224 environment : production
25+ needs : [fetch_version]
1326
1427 steps :
1528 - name : Checkout code
3548 cache-to : type=inline
3649 tags : |
3750 ghcr.io/python-discord/olli:latest
38- ghcr.io/python-discord/olli:${{ github.event.release.tag_name }}
51+ ghcr.io/python-discord/olli:${{ needs.fetch_version.outputs.version }}
3952
4053 publish_pypi_package :
4154 name : Build & Publish PyPI package
6477 run : poetry publish
6578 env :
6679 POETRY_PYPI_TOKEN_PYPI : ${{ secrets.PYPI_TOKEN }}
80+
81+ publish_notification :
82+ name : Publish notification to Discord
83+ runs-on : ubuntu-latest
84+ needs : [publish_pypi_package, publish_docker_image, fetch_version]
85+
86+ steps :
87+ - name : Send Discord notification
88+ env :
89+ DISCORD_WEBHOOK : ${{ secrets.DISCORD_WEBHOOK }}
90+ uses : Ilshidur/action-discord@master
91+ with :
92+ args : ' Olli `${{ needs.fetch_version.outputs.version }}` has been published to Docker + PyPI.'
You can’t perform that action at this time.
0 commit comments