-
Notifications
You must be signed in to change notification settings - Fork 2
84 lines (81 loc) · 2.75 KB
/
release.yml
File metadata and controls
84 lines (81 loc) · 2.75 KB
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
on:
push:
branches:
- master
name: Create Release With Report
jobs:
build:
name: Create Release With Report
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Build Report
run: |
cd report
chmod +x buildreport.sh
sudo apt-get install pandoc
sudo apt-get install texlive
sudo apt-get install zip
./buildreport.sh
cd ..
zip -r report.zip report
- name: 'Get Previous tag'
id: previoustag
run: |
git fetch -t
TAG=$(git describe --tags `git rev-list --tags --max-count=1`)
if [ -z "$TAG" ]
then
exit 1
else
echo "Tag Found: $TAG"
echo ::set-output name=tag::$TAG
fi
- name: 'Get next minor version'
id: semvers
uses: WyriHaximus/github-action-next-semvers@0.1.0
with:
version: ${{ steps.previoustag.outputs.tag }}
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.semvers.outputs.patch }}
release_name: ${{ steps.semvers.outputs.patch }}
draft: false
prerelease: false
- name: Upload Markdown Report
id: upload-release-asset-md
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./report/report.md
asset_name: report.md
asset_content_type: text/markdown
- name: Upload PDF Report
id: upload-release-asset-pdf
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./report/report.pdf
asset_name: report.pdf
asset_content_type: application/pdf
- name: Upload Zip Report
id: upload-release-asset-zip
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./report.zip
asset_name: report.zip
asset_content_type: application/zip