-
Notifications
You must be signed in to change notification settings - Fork 0
103 lines (81 loc) · 3.68 KB
/
build.yaml
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
name: Build and Deploy Windows App
on:
push:
branches:
- main
jobs:
build_and_deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: 20
- name: Install Wine
run: |
sudo apt-get update
sudo apt-get install wine
sudo apt-get install libwine
- name: Install Wine32 with Multiarch
run: |
sudo dpkg --add-architecture i386
sudo apt update
sudo apt install wine32
- name: Install dependencies
run: npm install
- name: Install Electron Builder
run: npm install -g electron-builder
- name: Build Electron App for Windows
run: electron-builder build --windows --publish never
- name: Upload
uses: BetaHuhn/do-spaces-action@v2
with:
access_key: ${{ secrets.DO_ACCESS_KEY_ID}}
secret_key: ${{ secrets.DO_SECRET_ACCESS_KEY }}
space_name: 20-20-20
space_region: blr1
source: dist/
# - name: Install aws CLI tools with Chocolatey
# run: choco install awscli -y
# - name: Upload file to DigitalOcean Spaces
# run: |
# aws s3 sync dist/ s3://20-20-20 --region blr1 --access-key-id ${{ secrets.DO_ACCESS_KEY_ID }} --secret-access-key ${{ secrets.DO_SECRET_ACCESS_KEY }}
# env:
# DO_SPACE_ACCESS_KEY_ID: ${{ secrets.DO_ACCESS_KEY_ID }}
# DO_SPACE_SECRET_ACCESS_KEY: ${{ secrets.DO_SECRET_ACCESS_KEY }}
# - name: Upload to DigitalOcean Spaces
# run: |
# curl -X PUT -T "dist/20-20-20-refresh Setup 1.0.0.exe" --header "Authorization: AWS $env:DO_ACCESS_KEY_ID:$env:DO_SECRET_ACCESS_KEY" --header "x-amz-storage-class: $env:DO_STORAGE_CLASS" --header "x-amz-acl: $env:DO_ACL" "https://$env:DO_SPACE.$env:DO_REGION.digitaloceanspaces.com"
# env:
# DO_ACCESS_KEY_ID: ${{ secrets.DO_ACCESS_KEY_ID }}
# DO_SECRET_ACCESS_KEY: ${{ secrets.DO_SECRET_ACCESS_KEY }}
# DO_REGION: "blr1"
# DO_SPACE: "20-20-20"
# DO_STORAGE_CLASS: "STANDARD"
# DO_ACL: "public-read"
# - name: Upload to DigitalOcean Spaces
# run: |
# curl -X PUT -T "dist/20-20-20-refresh Setup 1.0.0.exe" --header "Authorization: Bearer ${{ secrets.DO_TOKEN }}" "https://20-20-20.blr1.digitaloceanspaces.com"
# env:
# DO_ACCESS_TOKEN: ${{ secrets.DO_TOKEN }}
# - name: Upload Artifact
# uses: actions/upload-artifact@v2
# with:
# name: windows-executable
# path: dist/20-20-20-refresh Setup 1.0.0.exe
# - name: Upload to DigitalOcean Spaces
# run: |
# aws configure set profile.20-20-20.region blr1
# aws configure set profile.20-20-20.s3.endpoint https://20-20-20.blr1.digitaloceanspaces.com
# aws configure set profile.20-20-20.s3.signature_version s3v4
# aws configure set profile.20-20-20.credential_source environment
# aws configure set aws_access_key_id ${{ secrets.DO_ACCESS_KEY_ID }} --profile 20-20-20
# aws configure set aws_secret_access_key ${{ secrets.DO_SECRET_ACCESS_KEY }} --profile 20-20-20
# aws configure set region blr1 --profile 20-20-20
# aws s3 cp "dist/20-20-20-refresh Setup 1.0.0.exe" s3://20-20-20/app.exe --acl public-read --profile 20-20-20
# env:
# AWS_ACCESS_KEY_ID: ${{ secrets.DO_ACCESS_KEY_ID }}
# AWS_SECRET_ACCESS_KEY: ${{ secrets.DO_SECRET_ACCESS_KEY }}
# AWS_REGION: blr1