Skip to content

Commit

Permalink
add release step
Browse files Browse the repository at this point in the history
  • Loading branch information
devserkan committed Sep 16, 2024
1 parent 6183d4d commit 379c3cb
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
name: Deployment pipeline

env:
SHOULD_DEPLOY: ${{ github.event_name == 'push' && !contains(join(github.event.commits.*.message), '#skip') }}

on:
push:
branches:
- main
pull_request:
branches: [main]
types: [opened, synchronize]

jobs:
simple_deployment_pipeline:
Expand Down Expand Up @@ -39,6 +45,20 @@ jobs:
path: playwright-report/
retention-days: 30
- name: Deploy app
if: ${{ env.SHOULD_DEPLOY == 'true' }}
run: flyctl deploy --remote-only
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
tag_release:
if: ${{ github.event_name == 'push' && !contains(join(github.event.commits.*.message), '#skip') }}
needs: [simple_deployment_pipeline]
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: '0'
- name: Bump version and push tag
uses: anothrNick/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DEFAULT_BUMP: patch
4 changes: 2 additions & 2 deletions src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ app.patch('/api/anecdotes/:id', (req, res) => {
res.json(anecdotes[anecdoteIndex]);
});

app.get('/version', (req, res) => {
res.send('2');
app.get('/api/version', (req, res) => {
res.send('3');
});

app.get('*', (_req, res) => {
Expand Down

0 comments on commit 379c3cb

Please sign in to comment.