-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (36 loc) · 1.13 KB
/
Copy pathdeploy-render.yaml
File metadata and controls
41 lines (36 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: Deploy to Render
on:
workflow_run:
workflows: ["Backend CI"]
types: [completed]
branches: [main]
jobs:
deploy:
if: github.event.workflow_run.conclusion == 'success'
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Trigger Render deploy
run: curl -fsS -X POST "${{ secrets.RENDER_DEPLOY_HOOK }}"
- uses: actions/checkout@v4
with:
ref: main
fetch-depth: 0
- name: Compute next tag
id: bump
run: |
latest=$(git tag --sort=-v:refname | head -n1)
latest=${latest:-v0.1.0}
ver=${latest#v}
IFS='.' read -r major minor patch <<< "$ver"
patch=${patch:-0}
patch=$((patch + 1))
echo "new_tag=v${major}.${minor}.${patch}" >> "$GITHUB_OUTPUT"
- name: Create tag and release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ steps.bump.outputs.new_tag }}
target_commitish: main
generate_release_notes: true
prerelease: true # prerelease: ${{ !startsWith(steps.bump.outputs.new_tag, 'v1.') }}