Skip to content

chore(minor): rm monitor.bpf.o file #13

chore(minor): rm monitor.bpf.o file

chore(minor): rm monitor.bpf.o file #13

Workflow file for this run

name: Release Workflow
on:
push:
branches:
- main
pull_request:
branches:
- main
permissions:
contents: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.23'
- name: Install GoReleaser
run: go install github.com/goreleaser/goreleaser@latest
- name: Check version
run: |
VERSION=$(cat VERSION.txt)
echo "version=$VERSION" >> $GITHUB_ENV
echo "Version: $VERSION"
- name: Run build using goreleaser on local
run: goreleaser release --snapshot --skip=publish --clean
- name: Create Tag
if: |
(github.event_name == 'push' && github.ref == 'refs/heads/main') ||
(github.event_name == 'pull_request' &&
github.event.action == 'closed' &&
github.event.pull_request.merged == true &&
github.event.pull_request.base.ref == 'main')
run: |
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
git tag "v${{ env.version }}"
git push origin "v${{ env.version }}"
- name: Run GoReleaser Release
if: |
(github.event_name == 'push' && github.ref == 'refs/heads/main') ||
(github.event_name == 'pull_request' &&
github.event.action == 'closed' &&
github.event.pull_request.merged == true &&
github.event.pull_request.base.ref == 'main')
run: |
export GORELEASER_CURRENT_TAG="v${{ env.version }}"
export GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}
goreleaser release --clean --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}