-
Notifications
You must be signed in to change notification settings - Fork 1
58 lines (49 loc) · 1.44 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
name: 'Release'
on:
push:
tags:
- 'v[0-9]+\.[0-9]+\.[0-9]+'
jobs:
build:
name: 'Build'
uses: ./.github/workflows/build.yaml
test:
name: 'Test'
needs: build
uses: ./.github/workflows/test.yaml
publish-api-docs:
name: 'Publish API Docs'
needs: test
runs-on: ubuntu-latest
steps:
- name: 'Checkout Wiki'
uses: actions/checkout@v4
with:
repository: ${{github.repository}}.wiki
- name: 'Fetch API Docs'
uses: actions/download-artifact@v4
with:
name: api_docs.md
- name: 'Setup API Docs'
run: mv api_docs.md API-Reference-v1.md
- name: 'Commit and Push Wiki Changes'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add .
git commit -m "Publish API docs"
git push "https://:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.wiki.git"
create-release:
name: 'Create Release'
needs: publish-api-docs
runs-on: ubuntu-latest
steps:
- name: 'Checkout'
uses: actions/checkout@v4
- name: 'Create Release'
run: gh release create $RELEASE_VERSION --title $RELEASE_VERSION --notes-file ".github/release-notes.md"
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
RELEASE_VERSION: ${{github.ref_name}}