-
Notifications
You must be signed in to change notification settings - Fork 4
52 lines (46 loc) · 1.57 KB
/
release.yml
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
42
43
44
45
46
47
48
49
50
51
52
name: Release
on:
workflow_dispatch:
inputs:
release-type:
description: "Scope of the release; see https://python-poetry.org/docs/cli/#version"
type: choice
required: true
default: patch
options:
- patch
- minor
- major
jobs:
bump-version:
name: Bump version
runs-on: ubuntu-latest
env:
BACKEND_DIR: ./backend
steps:
- uses: actions/checkout@v3
with:
persist-credentials: false
- name: Bump version
id: bump-version
uses: bakdata/ci-templates/actions/[email protected]
with:
release-type: "${{ github.event.inputs.release-type }}"
working-directory: ${{ env.BACKEND_DIR }}
- name: Commit and push pyproject.toml file
uses: bakdata/ci-templates/actions/[email protected]
with:
commit-message: "Bump version ${{ steps.bump-version.outputs.old-tag }} → ${{ steps.bump-version.outputs.release-tag }}"
github-username: ${{ secrets.GH_USERNAME }}
github-email: ${{ secrets.GH_EMAIL }}
github-token: ${{ secrets.GH_TOKEN }}
- name: Create tag
run: |
git config user.name ${{ secrets.GH_USERNAME }}
git config user.email ${{ secrets.GH_EMAIL }}
git tag v${{ steps.bump-version.outputs.release-tag }}
- name: Push tag
uses: ad-m/[email protected]
with:
github_token: ${{ secrets.GH_TOKEN }}
branch: refs/tags/v${{ steps.bump-version.outputs.release-tag }}