From d64e396459ddab5dc35b56a7c5810040aff27590 Mon Sep 17 00:00:00 2001 From: toshiki-otaka Date: Mon, 3 Jun 2024 23:22:22 +0900 Subject: [PATCH 1/2] add workflow --- .github/workflows/build_and_upload.yml | 31 ++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/build_and_upload.yml diff --git a/.github/workflows/build_and_upload.yml b/.github/workflows/build_and_upload.yml new file mode 100644 index 0000000..f26fff0 --- /dev/null +++ b/.github/workflows/build_and_upload.yml @@ -0,0 +1,31 @@ +name: Build and Upload .so File + +on: + push: + branches: + - main + pull_request: + +jobs: + build: + runs-on: macos-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version-file: ./go.mod + + - name: Build .so file + run: | + mkdir -p build + go build -buildmode=plugin -o build/custom_linters.so ./plugin/main.go + + - name: Upload .so file + uses: actions/upload-artifact@v2 + with: + name: plugin.so + path: build/plugin.so From 1aba360a6ceb8d3963093be471f0f42047f13574 Mon Sep 17 00:00:00 2001 From: toshiki-otaka Date: Mon, 3 Jun 2024 23:26:48 +0900 Subject: [PATCH 2/2] fixed file name --- .github/workflows/build_and_upload.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_and_upload.yml b/.github/workflows/build_and_upload.yml index f26fff0..b0ad1c8 100644 --- a/.github/workflows/build_and_upload.yml +++ b/.github/workflows/build_and_upload.yml @@ -27,5 +27,5 @@ jobs: - name: Upload .so file uses: actions/upload-artifact@v2 with: - name: plugin.so - path: build/plugin.so + name: custom_linters.so + path: build/custom_linters.so