Skip to content

Merge pull request #2 from compscore/actions-plugin-release #1

Merge pull request #2 from compscore/actions-plugin-release

Merge pull request #2 from compscore/actions-plugin-release #1

Workflow file for this run

name: Compile and Release Plugin
on:
push:
tags:
- 'v*.*.*'
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup Go environment
uses: actions/setup-go@v2
with:
go-version: 1.20
- name: Compile Plugin
run: |
go build -o check.so -buildmode=plugin main.go
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
- name: Upload Plugin to Release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./check.so
asset_name: check.so
asset_content_type: application/octet-stream