[pre-commit.ci] pre-commit autoupdate (#402) #177
This file contains 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: Deploy | |
on: | |
push: | |
tags: | |
- "^20[0-9]+.[0-9]+$" | |
branches: | |
- main | |
workflow_dispatch: | |
concurrency: production | |
jobs: | |
bumpver: | |
runs-on: ubuntu-latest | |
outputs: | |
current_version: ${{ steps.bumpver.outputs.current_version }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: 3.11 | |
- name: Install bumpver | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install bumpver | |
- name: Configure git to push | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "Automated Publisher" | |
- name: Bump Version | |
id: bumpver | |
run: | | |
bumpver update | |
eval $(bumpver show --env) | |
echo "{current_version}=$CURRENT_VERSION" >> $GITHUB_OUTPUT | |
- name: Push Release Build to GitHub | |
run: | | |
git push | |
deploy: | |
runs-on: ubuntu-latest | |
needs: bumpver | |
environment: production | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: 1password/load-secrets-action@v2 | |
with: | |
export-env: true | |
env: | |
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }} | |
FLY_API_TOKEN: "op://GitHub Actions/joshthomas.dev/FLY_API_TOKEN" | |
- uses: superfly/flyctl-actions/setup-flyctl@master | |
- run: flyctl deploy --remote-only --depot=false | |
sentry: | |
runs-on: ubuntu-latest | |
needs: bumpver | |
environment: production | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: 1password/load-secrets-action@v2 | |
with: | |
export-env: true | |
env: | |
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }} | |
SENTRY_AUTH_TOKEN: "op://GitHub Actions/sentry/RELEASE_TOKEN" | |
- name: Create Sentry release | |
uses: getsentry/[email protected] | |
env: | |
SENTRY_ORG: "dunbrook-web" | |
SENTRY_PROJECT: "joshthomasdev" | |
with: | |
environment: production | |
version: ${{ needs.bumpver.outputs.current_version }} |