updated ci #59
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |