Skip to content

Commit

Permalink
chore(ci): wip, add draft of CI jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
heapwolf committed Feb 25, 2024
1 parent 012f6b3 commit 96719e7
Show file tree
Hide file tree
Showing 3 changed files with 112 additions and 13 deletions.
105 changes: 105 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
name: Socket CI

on: [push]

jobs:
mac_build:
name: macOS build
runs-on: macOS-13
timeout-minutes: 15

steps:
- uses: actions/checkout@v3

- name: Use Node.js
uses: actions/[email protected]
with:
node-version: 18.x

- name: webfactory/ssh-agent
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}

- name: Build app
run: |
npm install
npm run build
- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: ssc_artifacts_linux
path: /Users/runner/.local/share/socket/
retention-days: 1

linux_build:
name: Linux build
runs-on: ubuntu-latest-m
timeout-minutes: 20
needs: lint

steps:
- uses: actions/checkout@v3

- name: webfactory/ssh-agent
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}

- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 18.x

- name: Build app
run: |
npm install
npm run build
- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: ssc_artifacts_linux
path: /Users/runner/.local/share/socket/
retention-days: 1

windows:
name: Windows
runs-on: windows-latest
timeout-minutes: 20
needs: lint

steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.inputs.tag }}

- name: Configure SSH
run: Set-Service ssh-agent -StartupType Manual

- name: Start SSH
run: Start-Service ssh-agent

- name: Add SSH key
run: echo $env:SSH_PRIVATE_KEY | ssh-add -
env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}

- name: Add github.com to known_hosts
run: |
mkdir ~/.ssh
ssh-keyscan github.com >> ~/.ssh/known_hosts
- name: Build app
run: |
npm install
npm run build
- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: ssc_artifacts_linux
path: /Users/runner/.local/share/socket/
retention-days: 1

5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,8 @@
"lint": "standard \"**/*.js\""
},
"author": "Socket Supply Co. <[email protected]>",
"license": "MIT"
"license": "MIT",
"dependencies": {
"@socketsupply/socket": "^0.5.4"
}
}
15 changes: 3 additions & 12 deletions src/templates/socket.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,8 @@
;
; Socket ⚡︎ Runtime · A modern runtime for Web Apps · v0.5.4 (6d49f187)
;

; The value of the "script" property in the build section will be interpreted as
; a shell command when you run "ssc build". This is the most important command
; in this file. It will do all the heavy lifting and should handle 99.9% of your
; use cases for moving files into place or tweaking platform-specific build
; artifacts. If you don't specify it, ssc will just copy everything in your
; project to the build target.
;
; Note that "~" alias won't expand to the home directory in any of the config
; files. Use the full path instead.

; Note: "~" alias won't expand to the home directory in any of the config
; files; use the full path instead.

[build]

Expand Down Expand Up @@ -229,7 +220,7 @@ simulator_device = "iPhone 14"
; nonexempt_encryption = false

icon = "icons/icon.png"
icon_sizes = "20@1x 20@2x 20@3x"
icon_sizes = "29@1x 29@2x 29@3x 40@2x 40@3x 57@1x 57@2x 60@2x 60@3x"

[linux]
; Helps to make your app searchable in Linux desktop environments.
Expand Down

0 comments on commit 96719e7

Please sign in to comment.