Skip to content

Commit

Permalink
feat: add linux action
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark24Code committed Jun 27, 2024
1 parent e0ac96d commit 09e7843
Show file tree
Hide file tree
Showing 5 changed files with 73 additions and 5 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/alpine-amd64.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Alpine Musl - amd64

on:
push:
branches: [main]
pull_request:
branches: [main]

env:
PKG_DATE: 20240627
PLATFORM: linux
ARCHITECTURES: amd64

jobs:
make-linux-amd64:
strategy:
matrix:
os: [alpine]
ruby-version: [3.3.3]
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: build amd64
run: |
ls -al
gem install rake
rake build
- name: "Upload Artifact- osx amd64"
uses: actions/upload-artifact@v4
with:
name: app-${{ env.PKG_DATE }}-${{env.PLATFORM}}-${{env.ARCHITECTURES}}.tar.gz
path: build/app.tar.gz
34 changes: 34 additions & 0 deletions .github/workflows/alpine-arm64.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Alpine Musl - arm64

on:
push:
branches: [main]
pull_request:
branches: [main]

env:
PKG_DATE: 20240627
PLATFORM: linux
ARCHITECTURES: arm64

jobs:
make-linux-arm64:
strategy:
matrix:
os: [alpine]
ruby-version: [3.3.3]
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: build amd64
run: |
ls -al
gem install rake
rake build
- name: "Upload Artifact- osx amd64"
uses: actions/upload-artifact@v4
with:
name: app-${{ env.PKG_DATE }}-${{env.PLATFORM}}-${{env.ARCHITECTURES}}.tar.gz
path: build/app.tar.gz
4 changes: 2 additions & 2 deletions .github/workflows/osx-amd64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@ jobs:
- name: "Upload Artifact- osx amd64"
uses: actions/upload-artifact@v4
with:
name: app-${{ env.PKG_DATE }}-osx-${{env.ARCHITECTURES}}.tar.gz
path: build/linux.tar.gz
name: app-${{ env.PKG_DATE }}-${{env.PLATFORM}}-${{env.ARCHITECTURES}}.tar.gz
path: build/app.tar.gz
4 changes: 2 additions & 2 deletions .github/workflows/osx-arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@ jobs:
- name: "Upload Artifact- osx arm64"
uses: actions/upload-artifact@v4
with:
name: app-${{ env.PKG_DATE }}-osx-${{env.ARCHITECTURES}}.tar.gz
path: build/linux.tar.gz
name: app-${{ env.PKG_DATE }}-${{env.PLATFORM}}-${{env.ARCHITECTURES}}.tar.gz
path: build/app.tar.gz
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ task :build => [:"mruby:init", :build_merge, :build_to_c, :"mruby:build_config",
sh "cp #{MRUBY_BIN}/mruby #{BUILD_DIR}/portable/"
sh "mv #{BUILD_DIR}/main.rb #{BUILD_DIR}/portable/"
sh "rm #{BUILD_DIR}/*.h; rm #{BUILD_DIR}/*.c"
sh "tar -czvf #{BUILD_DIR}/linux.tar.gz #{BUILD_DIR}"
sh "tar -czvf #{BUILD_DIR}/app.tar.gz #{BUILD_DIR}"
end


Expand Down

0 comments on commit 09e7843

Please sign in to comment.