-
Notifications
You must be signed in to change notification settings - Fork 6
42 lines (35 loc) · 1.03 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
name: Release
on:
push:
tags:
- 'v*'
workflow_dispatch:
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Export version
id: version
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/}
- name: Package to zip
id: zip
run: |
filename=Dell_Optiplex_5070mff-${{ steps.version.outputs.tag }}.zip
zip -r ${filename} ./*
echo ::set-output name=filename::${filename}
- name: Install git-chglog
uses: craicoverflow/install-git-chglog@v1
- name: Generate changelog
run: git-chglog -o ${{ steps.version.outputs.tag }}.md ${{ steps.version.outputs.tag }}
- name: Release
uses: softprops/action-gh-release@v1
with:
draft: true
files: ${{ steps.zip.outputs.filename }}
body_path: ${{ steps.version.outputs.tag }}.md
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}