forked from rollkit/rollkit
-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (48 loc) · 1.3 KB
/
ci_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: CI and Release
on:
push:
branches:
- main
# Trigger on version tags
tags:
- 'v[0-9]+\.[0-9]+\.[0-9]+'
- 'v[0-9]+\.[0-9]+\.[0-9]+-rc(?:[0-9]+|\.[0-9]+)'
pull_request:
merge_group:
workflow_dispatch:
# Inputs the workflow accepts.
inputs:
version:
# Friendly description to be shown in the UI instead of 'name'
description: "Semver type of new version (major / minor / patch)"
# Input has to be provided for the workflow to run
required: true
type: choice
options:
- patch
- minor
- major
jobs:
lint:
uses: ./.github/workflows/lint.yml
with:
GO_VERSION: "1.21"
test:
uses: ./.github/workflows/test.yml
with:
GO_VERSION: "1.21"
proto:
uses: ./.github/workflows/proto.yml
# Make a release if this is a manually trigger job, i.e. workflow_dispatch
release:
needs: [lint, test, proto]
runs-on: ubuntu-latest
if: ${{ github.event_name == 'workflow_dispatch' }}
permissions: "write-all"
steps:
- uses: actions/checkout@v3
- name: Version Release
uses: rollkit/.github/.github/actions/version-release@v0.2.2
with:
github-token: ${{secrets.GITHUB_TOKEN}}
version-bump: ${{inputs.version}}