From ec65ca11d6d2cea9a8269737168d69e511d0d3aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20DURR?= Date: Fri, 26 Aug 2022 21:33:18 +0200 Subject: [PATCH] Added sentry release action (See: #444) --- .github/workflows/deploy.yml | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 17f7a50b..90fdc387 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -4,16 +4,11 @@ concurrency: production on: push: branches: [master] - workflow_run: - workflows: [Sith3 CI] - types: [completed] workflow_dispatch: jobs: - # Runs only if Unit tests are successful deployment: runs-on: ubuntu-latest - if: ${{github.event.workflow_run.conclusion == 'success'}} environment: production timeout-minutes: 30 @@ -41,7 +36,6 @@ jobs: export PATH="$HOME/.poetry/bin:$PATH" pushd ${{secrets.SITH_PATH}} - VERSION_LAST=$(git rev-parse HEAD) git pull poetry update poetry run ./manage.py migrate @@ -49,4 +43,16 @@ jobs: poetry run ./manage.py compilestatic poetry run ./manage.py compilemessages - sudo systemctl restart uwsgi \ No newline at end of file + sudo systemctl restart uwsgi + + sentry-release: + - uses: actions/checkout@v2 + - name: Create Sentry release + uses: getsentry/action-release@v1 + env: + SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} + SENTRY_ORG: ${{ secrets.SENTRY_ORG }} + SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }} + SENTRY_URL: ${{ secrets.SENTRY_URL }} + with: + environment: production