-
Notifications
You must be signed in to change notification settings - Fork 1
46 lines (37 loc) · 1.06 KB
/
publish.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
name: Create Release
on:
push:
tags:
- 'v*'
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Generate Package.zip
run: find . -not -path '*/\.*' -print | xargs zip package.zip
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: Get CHANGELOGS
run: python .release.py
- name: Pre Release
uses: softprops/action-gh-release@v1
if: contains(github.ref, 'beta') || contains(github.ref, 'alpha')
with:
body_path: ./result.txt
files: package.zip
prerelease: true
token: ${{ secrets.GITHUB_TOKEN }}
- name: Release
uses: softprops/action-gh-release@v1
if: ${{ ! contains(github.ref, 'beta') && ! contains(github.ref, 'alpha') }}
with:
body_path: ./result.txt
files: package.zip
prerelease: false
token: ${{ secrets.GITHUB_TOKEN }}