add possibility to read pcap files #44
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
push: | |
tags: ["v[0-9]+.[0-9]+.[0-9]+*"] | |
workflow_dispatch: | |
permissions: write-all | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
CARGO_TERM_COLOR: always | |
jobs: | |
macos: | |
name: macos | |
runs-on: macos-11 | |
steps: | |
- name: Fetch release version | |
run: | | |
echo "latest_tag=$(\ | |
curl -sL https://api.github.com/repos/Schievel1/mview/releases/latest | \ | |
jq -r ".tag_name")" >> $GITHUB_ENV | |
- uses: actions/checkout@v2 | |
- name: Install ARM target | |
run: rustup update && rustup target add aarch64-apple-darwin | |
- name: Test | |
run: cargo test --release | |
- name: Build ARM | |
run: cargo build --release --target=aarch64-apple-darwin | |
- name: rename executeable | |
run: | | |
cp ./target/aarch64-apple-darwin/release/mview ./mview-macos-aarch64-${{ env.latest_tag }} | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: mview-macos-aarch64-${{ env.latest_tag }} | |
path: ./mview-macos-aarch64-${{ env.latest_tag }} | |
windows: | |
name: windows | |
runs-on: windows-latest | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- name: Fetch release version | |
run: | | |
echo "latest_tag=$(\ | |
curl -sL https://api.github.com/repos/Schievel1/mview/releases/latest | \ | |
jq -r ".tag_name")" >> $GITHUB_ENV | |
- uses: actions/checkout@v2 | |
- name: Test | |
run: cargo test --release | |
- name: Build | |
run: cargo build --release | |
- name: rename executeable | |
run: | | |
cp ./target/release/mview.exe ./mview-windows-x86_64-${{ env.latest_tag }}.exe | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: mview-windows-x86_64-${{ env.latest_tag }}.exe | |
path: ./mview-windows-x86_64-${{ env.latest_tag }}.exe | |
linux: | |
name: linux | |
runs-on: ubuntu-latest | |
steps: | |
- name: Fetch release version | |
run: | | |
echo "latest_tag=$(\ | |
curl -sL https://api.github.com/repos/Schievel1/mview/releases/latest | \ | |
jq -r ".tag_name")" >> $GITHUB_ENV | |
- uses: actions/checkout@v2 | |
- name: Install musl dependencies | |
run: | | |
sudo apt-get install musl musl-dev musl-tools clang lld | |
- name: Install musl target | |
run: rustup update && rustup target add x86_64-unknown-linux-musl && rustup target add armv7-unknown-linux-musleabihf | |
- name: Test | |
run: cargo test --release | |
- name: Build x86_64 | |
run: cargo build --release --target=x86_64-unknown-linux-musl | |
- name: Build armv7 | |
run: cargo --config target.armv7-unknown-linux-musleabihf.linker=\"lld\" build --release --target=armv7-unknown-linux-musleabihf | |
- name: rename executeables | |
run: | | |
cp ./target/x86_64-unknown-linux-musl/release/mview ./mview-linux-x86_64-${{ env.latest_tag }} | |
cp ./target/armv7-unknown-linux-musleabihf/release/mview ./mview-linux-armv7-${{ env.latest_tag }} | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: mview-linux-x86_64-${{ env.latest_tag }} | |
path: ./mview-linux-x86_64-${{ env.latest_tag }} | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: mview-linux-armv7-${{ env.latest_tag }} | |
path: ./mview-linux-armv7-${{ env.latest_tag }} | |
make-release: | |
permissions: write-all | |
if: ${{ always() }} | |
needs: [macos, windows, linux] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Fetch release version | |
run: | | |
echo "latest_tag=$(\ | |
curl -sL https://api.github.com/repos/Schievel1/mview/releases/latest | \ | |
jq -r ".tag_name")" >> $GITHUB_ENV | |
- uses: actions/checkout@v3 | |
- uses: actions/download-artifact@v3 | |
- name: Display structure of downloaded files | |
run: ls -R | |
- uses: "marvinpinto/action-automatic-releases@latest" | |
with: | |
repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
automatic_release_tag: ${{ env.latest_tag }} | |
prerelease: false | |
files: | | |
./mview-macos-aarch64-${{ env.latest_tag }} | |
./mview-windows-x86_64-${{ env.latest_tag }}.exe | |
./mview-linux-x86_64-${{ env.latest_tag }} | |
./mview-linux-armv7-${{ env.latest_tag }} |