-
Notifications
You must be signed in to change notification settings - Fork 2
107 lines (85 loc) · 2.51 KB
/
release.yaml
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
name: release
on:
push:
branches:
- main
jobs:
tag:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-python@v2
with:
python-version: "3.10"
- name: Install dependencies
run: |
pip3 install poetry
- name: Python Semantic Release
uses: python-semantic-release/python-semantic-release@v8.3.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Store the release tag
id: release_version
run: |
echo "release_version=$(poetry version --short)" >> $GITHUB_ENV
outputs:
release_version: ${{ env.release_version }}
build:
needs: tag
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: v${{ needs.tag.outputs.release_version }}
- uses: actions/setup-python@v2
with:
python-version: "3.10"
- name: Install build dependencies
run: |
pip3 install poetry
- name: Build
run: poetry build
- name: Upload Artifacts
uses: actions/upload-artifact@v2
with:
name: salt-gnupg-rotate
path: dist/*
if-no-files-found: error
- name: Upload Artifacts to Release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: dist/*
file_glob: true
tag: v${{ needs.tag.outputs.release_version }}
overwrite: true
docs-build:
needs: tag
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: v${{ needs.tag.outputs.release_version }}
- uses: actions/setup-python@v2
with:
python-version: "3.10"
- name: Install dependencies
run: |
pip3 install poetry nox nox-poetry
- name: Build the standalone documentation
run: |
nox -s docs-build --force-color
- name: Create standalone documentation zip
working-directory: docs/_build
run: |
zip -r salt-gnupg-rotate-${{ needs.tag.outputs.release_version }}-documentation.zip .*
- name: Upload Artifacts to Release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: docs/_build/*-documentation.zip
file_glob: true
tag: v${{ needs.tag.outputs.release_version }}
overwrite: true