forked from lightdash/lightdash
-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (55 loc) · 1.96 KB
/
release-on-merge.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
name: Release on Merge
on:
push:
branches:
- main
- alpha
permissions:
contents: write
issues: write
pull-requests: write
jobs:
release:
runs-on: ubuntu-20.04
concurrency: ${{ github.ref }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '16'
- name: Install dependencies
run: yarn install
- name: Build
run: yarn build-published-packages
- name: Semantic Release
id: semantic
uses: cycjimmy/semantic-release-action@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
with:
semantic_version: 19
extra_plugins: |
@semantic-release/changelog@6
@semantic-release/git@10
@semantic-release/github@8
@amanda-mitchell/[email protected]
@google/semantic-release-replace-plugin@1
- name: Reset alpha branch upon release
if: |
steps.semantic.outputs.new_release_published == 'true' &&
steps.semantic.outputs.new_release_channel == null
run: "git push --force https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git HEAD:refs/heads/alpha"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Trigger helm chart update on release
if: |
steps.semantic.outputs.new_release_published == 'true' &&
steps.semantic.outputs.new_release_channel == null
run: |
curl \
-X POST \
-H "Accept: application/vnd.github.v3+json" \
-H "Authorization: token ${{ secrets.LIGHTDASH_BOT_PAT }}" \
-d '{"ref": "main", "inputs": {"lightdash-version": "${{ steps.semantic.outputs.new_release_version }}"}}' \
https://api.github.com/repos/lightdash/helm-charts/action/workflows/increment-lightdash-app-version.yml/dispatches