Skip to content

testing ci

testing ci #13

Workflow file for this run

name: "build"
on:
push:
branches:
- release
jobs:
draft_release:
name: Create Release
runs-on: ubuntu-latest
outputs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body: |
🚀 This release contains necessary binaries to install over-the-wire on different platforms. See README.md of this repo for more details.
draft: true
prerelease: false
build:
needs: [draft_release]
name: "Build"
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install coreutils for macOS
if: matrix.os == 'macOS-latest'
run: brew install coreutils
- name: Install Zip
if: matrix.os == 'windows-latest'
run: choco install zip
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install libpcap on Ubuntu
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y libpcap-dev
- name: Install libpcap on macOS
if: matrix.os == 'macos-latest'
run: |
brew update
brew install libpcap
- name: Install libpcap on Windows
if: matrix.os == 'windows-latest'
run: |
choco install wireshark && choco install winpcap
- name: Submodule update
run: git submodule update --init --recursive
shell: bash
- name: Build and Text
run: npm i && npm run build && npm run test
shell: bash
- name: Prebuild
run: npm run prebuild && zip -r prebuilds-${{ matrix.os }}.zip prebuilds
shell: bash
- name: ls
run: ls
shell: bash
- name: Upload
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.draft_release.outputs.upload_url }}
asset_path: prebuilds-${{ matrix.os }}.zip
asset_name: prebuilds-${{ matrix.os }}.zip
asset_content_type: application/zip