-
Notifications
You must be signed in to change notification settings - Fork 17
49 lines (39 loc) · 1.14 KB
/
ci.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
name: CI
permissions: {}
on:
push:
branches:
- master
tags:
- '*'
pull_request:
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/common-setup
- name: Check format
run: make lint_check
release:
# this job makes an official Github release
needs: [lint]
runs-on: ubuntu-latest
outputs:
version: ${{ steps.get_version.outputs.version }}
upload_url: ${{ steps.step_upload_url.outputs.upload_url }}
steps:
- uses: actions/checkout@v3
- name: Get the version
id: get_version
run: echo "version=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT
# only create release if tag start by 'v*'
- name: Create a Release
id: create_release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ steps.get_version.outputs.version }}
body_path: ${{ github.workspace }}/.github/RELEASE.md
if: startsWith(github.ref, 'refs/tags/v')
- id: step_upload_url
run: echo "upload_url=${{ steps.create_release.outputs.upload_url }}" >> $GITHUB_OUTPUT