-
Notifications
You must be signed in to change notification settings - Fork 51
61 lines (53 loc) · 1.81 KB
/
release-dbt-update.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
53
54
55
56
57
58
59
60
61
name: Release dbt Workflow
on:
workflow_dispatch:
inputs:
package_name:
description: 'Select package name'
type: choice
required: true
options:
- Attribution
- Unified
- MediaPlayer
- Ecommerce
- Normalize
- Web
- Mobile
- Fractribution
- Utils
# Add more package names as needed
version:
description: 'Enter version'
required: true
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Copy Schema File
run: |
bash .github/scripts/copy_schema.sh ${{ github.event.inputs.package_name }} ${{ github.event.inputs.version }}
- name: Update Component Versions
run: |
bash .github/scripts/update_versions.sh ${{ github.event.inputs.package_name }} ${{ github.event.inputs.version }}
- name: Get Users Username
id: get_username
uses: actions/github-script@v4
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const { data } = await github.users.getByUsername({
username: '${{ github.actor }}'
});
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: Release/${{ github.event.inputs.package_name }}/${{ github.event.inputs.version }}
base: main
title: "Release ${{ github.event.inputs.package_name }} version ${{ github.event.inputs.version }}"
body: |
This pull request is automatically generated to release version ${{ github.event.inputs.version }} of package ${{ github.event.inputs.package_name }}.
reviewers: ${{ steps.get_username.outputs.result }}