Skip to content

Commit

Permalink
Add workflow for making releases
Browse files Browse the repository at this point in the history
  • Loading branch information
saghul committed Nov 22, 2023
1 parent 1dcb61b commit 631dd93
Show file tree
Hide file tree
Showing 2 changed files with 111 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
- '!TODO'
- '!doc/**'
- '!examples/**'
- '.github/workflows/ci.yml'
- '.github/workflows/*.yml'
push:
branches:
- master
Expand Down
110 changes: 110 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
name: release

on:
pull_request:

jobs:
linux-x86:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: jirutka/setup-alpine@v1
with:
arch: x86
packages: "build-base make cmake"
- name: build
shell: alpine.sh {0}
run: |
make
mv build/qjs build/qjs-linux-x86
- name: check
shell: alpine.sh {0}
run: |
ldd build/qjs-linux-x86
- name: upload
uses: actions/upload-artifact@v3
with:
path: build/qjs-linux-x86

linux-x86_64:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: jirutka/setup-alpine@v1
with:
arch: x86_64
packages: "build-base make cmake"
- name: build
shell: alpine.sh {0}
run: |
make
mv build/qjs build/qjs-linux-x86_64
- name: check
shell: alpine.sh {0}
run: |
ldd build/qjs-linux-x86_64
- name: upload
uses: actions/upload-artifact@v3
with:
path: build/qjs-linux-x86_64

macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- name: build
run: |
mkdir build
cd build
cmake -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" ..
make -j$(getconf _NPROCESSORS_ONLN)
mv qjs qjs-darwin
- name: check
run: |
lipo -info build/qjs-darwin
- name: upload
uses: actions/upload-artifact@v3
with:
path: build/qjs-darwin

windows:
runs-on: windows-latest
defaults:
run:
shell: msys2 {0}
steps:
- uses: actions/checkout@v3
- name: Setup MSYS2
uses: msys2/setup-msys2@v2
with:
install: >-
git
make
pacboy: >-
cmake:p
ninja:p
toolchain:p
- name: build
run: |
make
mv build/qjs.exe build/qjs-windows-x86_64.exe
- name: check
run: |
ldd build/qjs-windows-x86_64.exe
- name: upload
uses: actions/upload-artifact@v3
with:
path: build/qjs-windows-x86_64.exe

upload-to-release:
runs-on: ubuntu-latest
needs: [linux-x86, linux-x86_64, macos, windows]
steps:
- name: get assets
uses: actions/download-artifact@v3
with:
path: assets
- name: upload to release
run: |
ls -lh assets
echo "TODO"

0 comments on commit 631dd93

Please sign in to comment.