Skip to content

Simplify installation instructions and add release workflow #1

Simplify installation instructions and add release workflow

Simplify installation instructions and add release workflow #1

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*'
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- goos: linux
goarch: amd64
suffix: linux-amd64
- goos: linux
goarch: arm64
suffix: linux-arm64
- goos: darwin
goarch: amd64
suffix: darwin-amd64
- goos: darwin
goarch: arm64
suffix: darwin-arm64
- goos: windows
goarch: amd64
suffix: windows-amd64
ext: .exe
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.21'
- name: Build
env:
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
run: |
go build -ldflags="-s -w" -o tlsanalyzer${{ matrix.ext }} ./cmd/tlsanalyzer
- name: Create archive
run: |
if [ "${{ matrix.goos }}" = "windows" ]; then
zip tlsanalyzer-${{ matrix.suffix }}.zip tlsanalyzer${{ matrix.ext }}
else
tar -czvf tlsanalyzer-${{ matrix.suffix }}.tar.gz tlsanalyzer${{ matrix.ext }}
fi
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: tlsanalyzer-${{ matrix.suffix }}
path: tlsanalyzer-${{ matrix.suffix }}.*
release:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: artifacts
- name: Create Release
uses: softprops/action-gh-release@v1
with:
files: artifacts/**/*
generate_release_notes: true