.github/workflows/linux.yml
name: Linux
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
make:
strategy:
matrix:
os: [ubuntu-20.04]
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- name: "[Enclose.IO] Install dependencies"
run: |
sudo apt update
sudo apt install -y build-essential squashfs-tools
- uses: actions/checkout@v2
with:
path: src
- name: "[Enclose.IO] Set up rubyc"
run: |
curl -OL https://github.com/pmq20/ruby-packer/releases/download/linux-x64/rubyc
chmod +x rubyc
- name: "[Enclose.IO] Set up Ruby"
uses: ruby/setup-ruby@v1
with:
working-directory: src
- name: "[Enclose.IO] Install rubocop"
run: gem install rubocop
- name: "[Enclose.IO] Run rubocop"
run: |
cd src
rubocop
- name: "[Enclose.IO] Check dependencies"
run: |
cat /etc/issue
uname -a
uname -p
uname -m
lscpu
which mksquashfs
mksquashfs -version
which ruby
ruby -v
- name: "[Enclose.IO] Bundle install"
run: |
cd src
bundle install
- name: "[Enclose.IO] MAIN"
run: |
export PATH="$(pwd):$PATH"
cd src
which rubyc
rubyc --version
rubyc bin/nodec -o pre-release-nodec-v140800.121803-linux-x64
- name: "[Enclose.IO] Create Linux Release"
if: ${{ github.ref == 'refs/heads/master' && success() }}
id: create_linux_release
uses: pmq20/create-release@delete-old-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: linux-x64
release_name: Latest Linux Pre-release
draft: false
prerelease: true
replace_old_tag: true
- name: "[Enclose.IO] Upload Linux Release"
if: ${{ github.ref == 'refs/heads/master' && success() }}
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_linux_release.outputs.upload_url }}
asset_path: src/pre-release-nodec-v140800.121803-linux-x64
asset_name: pre-release-nodec-v140800.121803-linux-x64
asset_content_type: application/octet-stream