updated ci #39
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: windows-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 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 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 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 | |