-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from mvc-works/updates
upgrade deps and scripts
- Loading branch information
Showing
13 changed files
with
511 additions
and
426 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
|
||
name: Deploy package | ||
|
||
on: | ||
release: | ||
types: [created] | ||
|
||
jobs: | ||
deploy: | ||
name: Deploy | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- run: curl -O https://download.clojure.org/install/linux-install-1.10.1.507.sh && chmod +x linux-install-1.10.1.507.sh && sudo ./linux-install-1.10.1.507.sh | ||
|
||
- uses: actions/checkout@v2 | ||
|
||
- name: Get yarn cache | ||
id: yarn-cache | ||
run: echo "::set-output name=dir::$(yarn cache dir)" | ||
|
||
- uses: actions/cache@v1 | ||
name: Cache node modules of yarn | ||
with: | ||
path: ${{ steps.yarn-cache.outputs.dir }} | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
- name: Cache Clojars | ||
uses: actions/cache@v1 | ||
env: | ||
cache-name: cache-clojars | ||
with: | ||
path: ~/.m2/repository | ||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('shadow-cljs.edn') }} | ||
restore-keys: | | ||
${{ runner.os }}-clojars | ||
- name: run tests | ||
run: 'yarn && yarn shadow-cljs compile client server' | ||
|
||
- run: echo Working on ${{ github.ref }} | ||
|
||
- name: deploy to clojars | ||
run: env CLOJARS_USERNAME=jiyinyiyong CLOJARS_PASSWORD=${{ secrets.CLOJARS_PASSWORD }} clojure -A:release |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
|
||
name: Test | ||
|
||
on: | ||
pull_request: {} | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
upload-assets: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: docker://timbru31/java-node:latest | ||
|
||
- name: Get yarn cache | ||
id: yarn-cache | ||
run: echo "::set-output name=dir::$(yarn cache dir)" | ||
|
||
- uses: actions/cache@v1 | ||
name: Cache node modules of yarn | ||
with: | ||
path: ${{ steps.yarn-cache.outputs.dir }} | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
- name: Cache Clojars | ||
uses: actions/cache@v1 | ||
env: | ||
cache-name: cache-clojars | ||
with: | ||
path: ~/.m2/repository | ||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('shadow-cljs.edn') }} | ||
restore-keys: | | ||
${{ runner.os }}-clojars | ||
- run: yarn && yarn shadow-cljs compile client server | ||
name: Build web assets |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
|
||
{ | ||
:paths ["src"] | ||
:aliases { | ||
:release { | ||
:extra-deps { | ||
applied-science/deps-library {:mvn/version "0.4.0"} | ||
} | ||
:main-opts ["-m" "applied-science.deps-library"] | ||
} | ||
} | ||
} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{:version "0.1.4-a1" | ||
:group-id "mvc-works" | ||
:artifact-id "ws-edn" | ||
:skip-tag true | ||
:description "WebSocket wrapper in ClojureScript" | ||
:scm-url "https://github.com/mvc-works/ws-edn"} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,25 @@ | ||
|
||
{:source-paths ["src"] | ||
:dependencies [[org.clojure/core.incubator "0.1.4"]] | ||
:repositories {"central" {:url "https://maven.aliyun.com/nexus/content/groups/public/"} | ||
"clojars" {:url "https://mirrors.ustc.edu.cn/clojars/"}} | ||
:open-file-command ["subl" ["%s:%s:%s" :file :line :column]] | ||
:builds {:client {:output-dir "target/" | ||
:asset-path "./" | ||
:target :browser | ||
:modules {:client {:init-fn ws-edn.page/main!}} | ||
:devtools {:after-load ws-edn.page/reload! | ||
:http-root "target" | ||
:http-port 7000} | ||
:release {:output-dir "dist/"} | ||
:module-hash-names 8 | ||
:build-options {:manifest-name "assets.edn"}} | ||
:server {:target :node-script | ||
:output-to "target/server.js" | ||
:main ws-edn.main/main! | ||
:devtools {:after-load ws-edn.main/reload!} | ||
:release {:output-to "dist/server.js"}}}} | ||
{ | ||
:source-paths ["src"] | ||
:dependencies [ | ||
[org.clojure/core.incubator "0.1.4"] | ||
] | ||
:open-file-command [ | ||
"subl" | ||
["%s:%s:%s" :file :line :column] | ||
] | ||
:dev-http {7000 "target"} | ||
:builds { | ||
:client { | ||
:output-dir "target/", :asset-path "./", :target :browser, :module-hash-names 8 | ||
:modules { | ||
:client {:init-fn ws-edn.page/main!} | ||
} | ||
:release {:output-dir "dist/"} | ||
:build-options {:manifest-name "assets.edn"} | ||
} | ||
:server { | ||
:target :node-script, :output-to "target/server.js", :main ws-edn.main/main! | ||
:release {:output-to "dist/server.js"} | ||
} | ||
} | ||
} |
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
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
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
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
Oops, something went wrong.