-
Notifications
You must be signed in to change notification settings - Fork 1
58 lines (46 loc) · 1.23 KB
/
cd.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
name: cd
on:
push:
tags:
- '*.*.*'
jobs:
version:
runs-on: ubuntu-22.04
outputs:
v_tag: ${{ steps.version.outputs.TAG_VERSION }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Get tag version
id: version
run: echo "TAG_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
lint:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install yamllint
run: |
python -m pip install --upgrade pip
python -m pip install --user yamllint
- name: Lint metadata file
run: |
yamllint -d "{extends: relaxed, rules: {line-length: {max: 120}}}" metadata.yaml
release:
needs: ["lint", "version"]
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Release
uses: ncipollo/release-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ needs.version.outputs.v_tag }}
name: Version ${{ needs.version.outputs.v_tag }}
draft: false
prerelease: ${{ contains(needs.version.outputs.v_tag, 'rc') }}