attempt staticly linking #12
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: | |
pull_request: | |
branches: [ "main" ] | |
push: | |
branches: [ "main" ] | |
permissions: | |
contents: write | |
jobs: | |
BuildAndRelease: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Tag | |
id: tag | |
uses: anothrNick/github-tag-action@v1 # Don't use @master or @v1 unless you're happy to test the latest version | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # if you don't want to set write permissions use a PAT token | |
WITH_V: false | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: stable | |
- name: Install Prerequisites | |
run: | | |
sudo apt-get install libpcap-dev | |
- name: Build | |
run: make build | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: sherlock | |
path: sherlock | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token | |
with: | |
tag_name: "${{ steps.tag.outputs.new_tag }}" | |
release_name: Release ${{ steps.tag.outputs.new_tag }} | |
draft: false | |
prerelease: false | |
- name: Upload Release Asset | |
id: upload-release-asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps | |
asset_path: sherlock | |
asset_name: sherlock | |
asset_content_type: application/octet-stream |