-
Notifications
You must be signed in to change notification settings - Fork 24
74 lines (55 loc) · 1.58 KB
/
publish-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
name: Publish Release
on:
push:
tags: [ "[0-9]+.[0-9]+.[0-9]+**" ]
permissions:
contents: write
concurrency:
group: publish-release-${{github.ref_name}}
cancel-in-progress: false
jobs:
build:
runs-on: macos-12
steps:
- uses: actions/checkout@v3
- name: Select Xcode
run: sudo xcode-select -s /Applications/Xcode_14.1.app/Contents/Developer
- name: Build Docs
run: make generate-docs SUBDIR=${{ github.ref_name }}
- name: Archive Docs
run: tar -czf docs.tar.gz -C .build docs
- name: Upload Docs Archive
uses: actions/upload-artifact@v3
with:
name: docs-${{ github.ref_name }}
path: docs.tar.gz
publish:
runs-on: ubuntu-latest
needs: [ build ]
steps:
- uses: actions/checkout@v3
- name: Download Docs Archive
uses: actions/download-artifact@v3
with:
name: docs-${{ github.ref_name }}
path: '.'
- name: Unarchive Docs
run: tar -xvf docs.tar.gz
- name: Deploy Docs
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: docs
clean: false
- name: Check Version Format in Tag
id: version
uses: nowsprinting/check-version-format-action@v3
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
name: 🚀 v${{ github.ref_name }}
tag_name: ${{ github.ref_name }}
generate_release_notes: true
prerelease: ${{ steps.version.outputs.is_stable != 'true' }}
draft: false