From c59209d84903d639cd0b48e4a5c3bf638c680be4 Mon Sep 17 00:00:00 2001 From: sarahcssiqueira Date: Wed, 2 Oct 2024 15:10:17 -0300 Subject: [PATCH] feat: adds release workflow, improves deployment workflow ensuring it run only on main branch --- .github/workflows/deploy.yml | 2 ++ .github/workflows/release.yml | 25 +++++++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 385198f..3fb9633 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -2,6 +2,8 @@ name: Deploy to DigitalOcean on: push: + branches: + - main tags: - '*' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..b8dd950 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,25 @@ +name: Release + +on: + push: + branches: + - main + tags: + - v* + +jobs: + release: + name: Create Release on Tag + runs-on: ubuntu-22.04 + permissions: + contents: write + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Create release + uses: ncipollo/release-action@v1 + with: + body: "For changes in this release, see the changelog:" + generateReleaseNotes: true \ No newline at end of file