forked from chen310/NeteaseCloudMusicTasks
-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (49 loc) · 1.28 KB
/
upload.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
name: "upload"
on:
workflow_dispatch:
push:
branches:
- main
paths:
- "**.py"
- "**.json"
- "README.md"
- ".github/workflows/upload.yml"
- "!serverless/**"
- "!scheduler.py"
- "!ql_update.py"
concurrency:
group: upload-workflow
cancel-in-progress: true
jobs:
upload-files:
if: github.repository == 'chen310/NeteaseCloudMusicTasks'
name: upload
runs-on: ubuntu-latest
steps:
- name: Clone local repository
uses: actions/checkout@v2
- name: Create config file
run: mv config.example.json config.json
- name: Write sha to config file
run: sed -i "s/commitId/${{ github.sha }}/g" config.json
- name: Setting environment variable
run: |
ver=$(cat config.json | grep version | grep -o "[\.0-9]*")
echo "VERSION=$ver" >> $GITHUB_ENV
- name: Upload Artifact
uses: actions/upload-artifact@v2
with:
name: code_${{ env.VERSION }}
path: |
./
!./.git/
!./.github/
!./public/
!./serverless/
!./.dockerignore
!./.gitignore
!./requirements.txt
!./Dockerfile
!./ql_update.py
!./scheduler.py