feat: github workflow init #3
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 Privateer and Run Help | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Privateer repository | |
uses: actions/checkout@v3 | |
with: | |
repository: privateerproj/privateer | |
path: privateer | |
- name: Set up Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: 1.22 | |
- name: Install dependencies | |
run: | | |
cd privateer | |
go mod download | |
- name: Run make release | |
run: | | |
cd privateer | |
make release | |
- name: Run privateer help command | |
run: | | |
cd privateer/ | |
# Assuming the binary is named 'privateer'. Adjust if it's named differently. | |
./privateer help | |
- name: Archive release artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: release-artifacts | |
path: privateer/release/ | |
- name: Archive help output | |
uses: actions/upload-artifact@v3 | |
with: | |
name: help-output | |
path: privateer/release/help-output.txt |