Skip to content

Commit

Permalink
Fix ci
Browse files Browse the repository at this point in the history
  • Loading branch information
mtso committed Aug 12, 2021
1 parent fbdebd1 commit 9c15870
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 39 deletions.
35 changes: 0 additions & 35 deletions .github/workflows/release.yml

This file was deleted.

42 changes: 42 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: release
on:
push:
branches:
- main
jobs:
Build-Artifacts:
runs-on: ubuntu-latest
strategy:
matrix:
deno-version: [1.11.4]
steps:
- name: Checkout Repo
uses: actions/checkout@v2
- name: Use Deno version
uses: denoland/setup-deno@v1
with:
deno-version: "1.11.4"
is-canary: false
- name: Test
run: bash tools/test.sh
# - name: Compile
# run: |
# echo $DENO_CANARY
# DENO_CANARY=false
# bash tools/compile.sh
# - name: Upload release to GitHub
# uses: softprops/action-gh-release@v1
# if: |
# github.repository == 'mtso/obi' &&
# startsWith(github.ref, 'refs/tags/')
# with:
# # build/obi-x86_64-pc-windows-msvc
# # build/obi-x86_64-apple-darwin
# # build/obi-aarch64-apple-darwin
# files: |
# build/obi-x86_64-unknown-linux-gnu
# build/obi-x86_64-pc-windows-msvc
# build/obi-x86_64-apple-darwin
# build/obi-aarch64-apple-darwin
# draft: true
# token: ${{ secrets.GITHUB_TOKEN }}
22 changes: 18 additions & 4 deletions tools/compile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,28 @@

set -x

mkdir -p build/releases

mkdir -p build/x86_64-apple-darwin
deno compile --allow-all --output build/x86_64-apple-darwin/obi-x86_64-apple-darwin --target x86_64-apple-darwin obi.ts
deno compile --allow-all --output build/x86_64-apple-darwin/obi --target x86_64-apple-darwin obi.ts
cd build/x86_64-apple-darwin
zip -r ../releases/obi-x86_64-apple-darwin.zip obi
cd ../..

mkdir -p build/x86_64-unknown-linux-gnu
deno compile --allow-all --output build/x86_64-unknown-linux-gnu/obi-x86_64-unknown-linux-gnu --target x86_64-unknown-linux-gnu obi.ts
deno compile --allow-all --output build/x86_64-unknown-linux-gnu/obi --target x86_64-unknown-linux-gnu obi.ts
cd build/x86_64-unknown-linux-gnu
zip -r ../releases/obi-x86_64-unknown-linux-gnu.zip obi
cd ../..

mkdir -p build/x86_64-pc-windows-msvc
deno compile --allow-all --output build/x86_64-pc-windows-msvc/obi-x86_64-pc-windows-msvc --target x86_64-pc-windows-msvc obi.ts
deno compile --allow-all --output build/x86_64-pc-windows-msvc/obi --target x86_64-pc-windows-msvc obi.ts
cd build/x86_64-pc-windows-msvc
zip -r ../releases/obi-x86_64-pc-windows-msvc.zip obi.exe
cd ../..

mkdir -p build/aarch64-apple-darwin
deno compile --allow-all --output build/aarch64-apple-darwin/obi-aarch64-apple-darwin --target aarch64-apple-darwin obi.ts
deno compile --allow-all --output build/aarch64-apple-darwin/obi --target aarch64-apple-darwin obi.ts
cd build/aarch64-apple-darwin
zip -r ../releases/obi-aarch64-apple-darwin.zip obi
cd ../..

0 comments on commit 9c15870

Please sign in to comment.