forked from nICEnnnnnnnLee/BilibiliDown
-
Notifications
You must be signed in to change notification settings - Fork 0
105 lines (91 loc) · 3.77 KB
/
upload-manually.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
94
95
96
97
98
99
100
101
102
103
104
105
# This workflow will build a package using Maven and then publish it to GitHub packages when a release is created
# For more information see: https://github.com/actions/setup-java#apache-maven-with-a-settings-path
name: Upload Zips
on:
workflow_dispatch:
inputs:
supabase:
description: 'Upload to supabase?'
type: boolean
default: true
required: false
cloudinary:
description: 'Upload to cloudinary?'
type: boolean
default: true
required: false
bitbucket:
description: 'Upload to bitbucket?'
type: boolean
default: true
required: false
giteePush:
description: 'Push to gitee?'
type: boolean
default: true
required: false
bitbucketPush:
description: 'Push to bitbucket?'
type: boolean
default: true
required: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.ref }}
- name: Set up JDK 1.8
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '8'
- name: Read tag_latest and Save build info
id: tag_latest
run: |
python ./.github/scripts/read_version_and_save_build_info.py
- name: Download files
run: |
wget https://github.com/nICEnnnnnnnLee/BilibiliDown/releases/download/V${{steps.tag_latest.outputs.value}}/BilibiliDown.v${{steps.tag_latest.outputs.value}}.release.zip
wget https://github.com/nICEnnnnnnnLee/BilibiliDown/releases/download/V${{steps.tag_latest.outputs.value}}/BilibiliDown.v${{steps.tag_latest.outputs.value}}.release.zip.sha1
- name: Upload release to supabase
env:
VERSION_NUMBER: ${{ steps.tag_latest.outputs.value }}
SUPABASE_ANON_KEY: ${{ secrets.SUPABASE_ANON_KEY }}
if: ${{ always() && env.SUPABASE_ANON_KEY != '' && github.event.inputs.supabase == 'true'}}
run: |
chmod +x .github/scripts/upload_supabase.sh
./.github/scripts/upload_supabase.sh
- name: Upload release to cloudinary
env:
CLOUDINARY_API_KEY: ${{ secrets.CLOUDINARY_API_KEY }}
CLOUDINARY_API_SECRET: ${{ secrets.CLOUDINARY_API_SECRET }}
ZIP_FILE_NAME: BilibiliDown.v${{steps.tag_latest.outputs.value}}.release.zip
SHA1_FILE_NAME: BilibiliDown.v${{steps.tag_latest.outputs.value}}.release.zip.sha1
if: ${{ always() && env.CLOUDINARY_API_KEY != '' && env.CLOUDINARY_API_SECRET != '' && github.event.inputs.cloudinary == 'true'}}
run: |
chmod +x .github/scripts/upload_cloudinary.sh
./.github/scripts/upload_cloudinary.sh
- name: Upload release to bitbucket
env:
VERSION_NUMBER: ${{ steps.tag_latest.outputs.value }}
BITBUCKET_TOKEN: ${{ secrets.BITBUCKET_TOKEN }}
if: ${{ always() && env.BITBUCKET_TOKEN != '' && github.event.inputs.bitbucket == 'true'}}
run: |
chmod +x .github/scripts/upload_bitbucket.sh
./.github/scripts/upload_bitbucket.sh
- name: Sync Push to Gitee
env:
GITEE_AUTH: ${{ secrets.GITEE_AUTH }}
if: ${{ always() && env.GITEE_AUTH != '' && github.event.inputs.giteePush == 'true'}}
run: |
chmod +x .github/scripts/sync_push_to_gitee.sh
./.github/scripts/sync_push_to_gitee.sh
- name: Sync Push to Bitbucket
env:
BITBUCKET_TOKEN: ${{ secrets.BITBUCKET_TOKEN }}
if: ${{ always() && env.BITBUCKET_TOKEN != '' && github.event.inputs.bitbucketPush == 'true'}}
run: |
chmod +x .github/scripts/sync_push_to_bitbucket.sh
./.github/scripts/sync_push_to_bitbucket.sh