-
-
Notifications
You must be signed in to change notification settings - Fork 1
45 lines (43 loc) · 1.36 KB
/
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
name: release
on: push
permissions:
contents: write
jobs:
release:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Fetch all tags
run: git fetch --depth=1 --tags
- name: Setup Python
uses: actions/setup-python@v4
- name: Install build
if: github.repository_owner == 'pawamoy-insiders'
run: python -m pip install build
- name: Build dists
if: github.repository_owner == 'pawamoy-insiders'
run: python -m build
- name: Upload dists artifact
uses: actions/upload-artifact@v4
if: github.repository_owner == 'pawamoy-insiders'
with:
name: mkdocs-pygments-insiders
path: ./dist/*
- name: Install git-changelog
if: github.repository_owner != 'pawamoy-insiders'
run: pip install git-changelog
- name: Prepare release notes
if: github.repository_owner != 'pawamoy-insiders'
run: git-changelog --release-notes > release-notes.md
- name: Create release with assets
uses: softprops/action-gh-release@v1
if: github.repository_owner == 'pawamoy-insiders'
with:
files: ./dist/*
- name: Create release
uses: softprops/action-gh-release@v1
if: github.repository_owner != 'pawamoy-insiders'
with:
body_path: release-notes.md