-
Notifications
You must be signed in to change notification settings - Fork 3
93 lines (91 loc) · 3.72 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
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
name: GitHub Release Workflow
on:
push:
tags:
# Semver-like tags "X.Y.Z"
- "[0-9]+.[0-9]+.[0-9]+"
jobs:
release:
name: Create GitHub Release
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2
# Parse version number from GITHUB_REF: "refs/tags/X.Y.Z" -> "X.Y.Z"
- name: Parse git tag
id: tag
run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/}
# Extract release notes for version "X.Y.Z"
- name: Extract release notes
run: make release-notes v=${{ steps.tag.outputs.VERSION }}
# Create GitHub Release for tag "X.Y.Z"
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
# Default GitHub Actions token
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.tag.outputs.VERSION }}
release_name: ${{ steps.tag.outputs.VERSION }}
body_path: ./build/release/body.txt
# Add SOK-DGvX.Y.Z.html to the GitHub Release
- name: Upload HTML asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./releases/SOK-DGv${{ steps.tag.outputs.VERSION }}.html
asset_name: SOK-DGv${{ steps.tag.outputs.VERSION }}.html
asset_content_type: text/html
# Add SOK-DGvX.Y.Z.pdf to the GitHub Release
- name: Upload PDF asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./releases/SOK-DGv${{ steps.tag.outputs.VERSION }}.pdf
asset_name: SOK-DGv${{ steps.tag.outputs.VERSION }}.pdf
asset_content_type: application/pdf
# Add SOK-AGvX.Y.Z.html to the GitHub Release
- name: Upload HTML asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./releases/SOK-AGv${{ steps.tag.outputs.VERSION }}.html
asset_name: SOK-AGv${{ steps.tag.outputs.VERSION }}.html
asset_content_type: text/html
# Add SOK-AGvX.Y.Z.pdf to the GitHub Release
- name: Upload PDF asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./releases/SOK-AGv${{ steps.tag.outputs.VERSION }}.pdf
asset_name: SOK-AGv${{ steps.tag.outputs.VERSION }}.pdf
asset_content_type: application/pdf
# Add SOK-MGvX.Y.Z.html to the GitHub Release
- name: Upload HTML asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./releases/SOK-MGv${{ steps.tag.outputs.VERSION }}.html
asset_name: SOK-MGv${{ steps.tag.outputs.VERSION }}.html
asset_content_type: text/html
# Add SOK-MGvX.Y.Z.pdf to the GitHub Release
- name: Upload PDF asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./releases/SOK-MGv${{ steps.tag.outputs.VERSION }}.pdf
asset_name: SOK-MGv${{ steps.tag.outputs.VERSION }}.pdf
asset_content_type: application/pdf