v1.0.1 #3
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: Build-n-Release | |
on: | |
workflow_dispatch: | |
inputs: | |
ref_name: | |
description: Release Version | |
required: true | |
release: | |
types: [created] | |
env: | |
REGISTRY: ghcr.io | |
IMAGE_NAME: ${{ github.repository }} | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- run: sudo apt update && sudo apt install -y libaio-dev libleveldb-dev libsnappy-dev g++ libcap2-bin libpcap-dev libseccomp-dev jq openssl ca-certificates | |
- name: Set up Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: 1.22 | |
- name: Compile Stenographer | |
run: | | |
go mod tidy | |
go get ./... | |
go build | |
make -C stenotype | |
- name: Test Stenographer | |
run: | | |
go test ./... | |
# - name: Integration Test | |
# run: bash integration_test/test.sh | |
- run: | | |
echo "VERSION=${{ github.ref_name || github.event.inputs.ref_name }}" >> $GITHUB_ENV | |
- name: Upload release | |
if: github.event_name != 'pull_request' | |
uses: boxpositron/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
release_config: | | |
stenographer | |
stenoread | |
tag_name: ${{ env.VERSION }} | |
release_name: stenographer_${{ env.VERSION }} | |
draft: false | |
prerelease: false | |
overwrite: true | |
- name: Log in to the Container registry | |
if: false | |
uses: docker/[email protected] | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Docker Build and push (server) | |
if: false | |
uses: docker/[email protected] | |
with: | |
context: ./docker | |
push: true | |
tags: | | |
ghcr.io/qxip/stenographer:latest | |
ghcr.io/qxip/stenographer:${{ env.VERSION }} |