Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto build release action #753

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 80 additions & 0 deletions .github/workflows/release_cc-cpp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: Build and release C/C++ build

on:
release:
types: [created]
pull_request:
branches: [ "master" ]

jobs:
build:
permissions: write-all
name: ${{ matrix.platform.os_name }} Build
runs-on: ${{ matrix.platform.os }}
strategy:
matrix:
platform:

- os_name: macOS-x86_64
os: macos-latest
target: x86_64-apple-darwin
name: ${{ github.event.repository.name }}-macOS-x86_64-apple-darwin.tar.gz

- os_name: Linux-x86_64-gnu
os: ubuntu-latest
target: x86_64-unknown-linux-gnu
name: ${{ github.event.repository.name }}-x86_64-unknown-linux-gnu.tar.gz

- os_name: Windows-x86_64-MinGW
os: windows-latest
target: x64
name: ${{ github.event.repository.name }}-x86_64-pc-windows-mingw.zip

- os_name: Windows-x86_64-MSVC
os: windows-latest
target: x64
name: ${{ github.event.repository.name }}-x86_64-pc-windows-msvc.zip

- os_name: Windows-x86_32-MSVC
os: windows-latest
target: Win32
name: ${{ github.event.repository.name }}-x86_32-pc-windows-msvc.zip

steps:
- uses: actions/checkout@v3

- name: make
run: make
if: contains(matrix.platform.name, 'gnu') || contains(matrix.platform.name, 'mingw') || contains(matrix.platform.name, 'apple')

- name: Add msbuild to PATH
uses: microsoft/[email protected]
if: contains(matrix.platform.name, 'msvc')

- name: Build VS2022 Release
run: msbuild vs143/masscan.sln -t:rebuild -verbosity:diag /p:Configuration=Release /p:Platform=${{ matrix.platform.target }}
if: contains(matrix.platform.name, 'msvc')

- name: Package as archive
shell: bash
run: |
echo running archive
cd bin
if [[ "${{ matrix.platform.os }}" == "windows-latest" ]]; then
7z a ../${{ matrix.platform.name }} ${{ github.event.repository.name }}.exe
7z a ../${{ matrix.platform.name }}.with_dll.zip ${{ github.event.repository.name }}.exe ./${{ matrix.platform.target }}/*
else
tar czvf ../${{ matrix.platform.name }} ${{ github.event.repository.name }}
fi
cd -
if: |
( startsWith( github.ref, 'refs/tags/v' ) ||
github.ref == 'refs/tags/test-release' )

- name: Publish GitHub release
uses: softprops/action-gh-release@v1
with:
draft: true
files: "${{ github.event.repository.name }}-*"
body_path: Changes.md
if: startsWith( github.ref, 'refs/tags/v' )
Binary file added bin/Win32/Packet.dll
Binary file not shown.
Binary file added bin/Win32/wpcap.dll
Binary file not shown.
Binary file added bin/x64/Packet.dll
Binary file not shown.
Binary file added bin/x64/wpcap.dll
Binary file not shown.
26 changes: 26 additions & 0 deletions vs143/masscan.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "masscan", "masscan.vcxproj", "{C88D7583-254F-4BE6-A9B9-89A5BB52E679}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Debug|x64 = Debug|x64
Release|Win32 = Release|Win32
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{C88D7583-254F-4BE6-A9B9-89A5BB52E679}.Debug|Win32.ActiveCfg = Debug|Win32
{C88D7583-254F-4BE6-A9B9-89A5BB52E679}.Debug|Win32.Build.0 = Debug|Win32
{C88D7583-254F-4BE6-A9B9-89A5BB52E679}.Debug|x64.ActiveCfg = Debug|x64
{C88D7583-254F-4BE6-A9B9-89A5BB52E679}.Debug|x64.Build.0 = Debug|x64
{C88D7583-254F-4BE6-A9B9-89A5BB52E679}.Release|Win32.ActiveCfg = Release|Win32
{C88D7583-254F-4BE6-A9B9-89A5BB52E679}.Release|Win32.Build.0 = Release|Win32
{C88D7583-254F-4BE6-A9B9-89A5BB52E679}.Release|x64.ActiveCfg = Release|x64
{C88D7583-254F-4BE6-A9B9-89A5BB52E679}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
Loading