Skip to content

Commit

Permalink
GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
andromedarabbit committed May 12, 2021
1 parent e2b76d0 commit 4a2d17a
Show file tree
Hide file tree
Showing 2 changed files with 92 additions and 2 deletions.
88 changes: 88 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
name: build

on:
push:
# Temporarily disable this action
# See https://github.community/t/how-can-i-disable-a-github-action/17049
# branches-ignore:
# - "**"
schedule:
# * is a special character in YAML so you have to quote this string
# At 05:00 on Sunday
# https://crontab.guru/#0_5_*_*_0
- cron: "0 4 * * 0"

jobs:
build:
runs-on: ubuntu-latest
# runs-on: self-hosted
timeout-minutes: 5
steps:
- name: Env
run: |
env | sort
- uses: actions/checkout@v2
with:
lfs: true
submodules: true

- name: Set up JDK 1.15
uses: actions/setup-java@v1
with:
java-version: 1.15

- name: Build
run: |-
# TODO 깨진 테스트 복구하기
mvn install -DskipTests=true
- name: Package
run: |-
./make-package.sh
# - name: Start SSH via Ngrok
# # if: ${{ failure() }}
# run: |
# curl -sL https://gist.github.com/andromedarabbit/4aa58f257d05014f5cf543ebfa7188db/raw/9d0935bbfc3c63d81f4f265f355c0f5d265c2fce/debug-github-actions.sh | bash
# env:
# # After sign up on the https://ngrok.com/
# # You can fin this token here: https://dashboard.ngrok.com/get-started/setup
# NGROK_TOKEN: ${{ secrets.NGROK_TOKEN }}
# # This password you will use when authorizing via SSH
# USER_PASS: ${{ secrets.USER_PASS }}
# USER: runner
# - name: Don't kill instace
# # if: ${{ failure() }}
# run: sleep 1h

release-it:
needs: build
runs-on: ubuntu-latest
# runs-on: self-hosted
timeout-minutes: 15

steps:
# - name: Prepare
# run: |-
# curl --silent -L -O https://github.com/github-release/github-release/releases/download/v0.10.0/linux-amd64-github-release.bz2

# bzip2 -d linux-amd64-github-release.bz2
# mv linux-amd64-github-release github-release

# - name: Release
# run: |-
# export GITHUB_TOKEN=${{ secrets.PACKAGES_WRITE_USERNAME }}

# github-release release --user uberple --repo mecab-ko-lucene-analyzer --tag "v0.21.0" --name "Testing" --pre-release

# github-release upload --user uberple --repo mecab-ko-lucene-analyzer --tag "v0.21.0" --name "elasticsearch-analysis-mecab-ko-7.12.1.0.zip" --file "dist/elasticsearch-analysis-mecab-ko-7.12.1.0.zip"

- uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: ${{ github.token }}
automatic_release_tag: "latest"
prerelease: false
files: |
LICENSE
"elasticsearch-analysis-mecab-ko-*.zip"
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
![build](https://github.com/uberple/mecab-ko-lucene-analyzer/workflows/build/badge.svg)

# mecab-ko-lucene-analyzer

## 소개
Expand Down Expand Up @@ -55,7 +57,7 @@ __주의 사항__
- OpenJDK를 사용하시는 경우, 최적화 옵션을 -O나 -O1로 고쳐야 합니다. [mecab-ko-lucene-analyzer OpenJDK에서 사용하기](http://eunjeon.blogspot.kr/2013/04/mecab-ko-lucene-analyzer-openjdk.html) 참조

### mecab-ko-lucene-analyzer 다운로드 및 설치
[mecab-ko-lucene-analyzer 다운로드 페이지](https://bitbucket.org/eunjeon/mecab-ko-lucene-analyzer/downloads)에서 `mecab-ko-lucene-analyzer-XX.tar.gz`의 최신 버전을 다운 받아 압축을 풀면 두개의 jar파일이 있습니다.
[mecab-ko-lucene-analyzer 다운로드 페이지](https://bitbucket.org/eunjeon/mecab-ko-lucene-analyzer/downloads)에서 `mecab-ko-lucene-analyzer-XX.tar.gz`의 최신 버전을 다운 받아 압축을 풀면 두개의 jar파일이 있습니다.

- mecab-ko-mecab-loader-XX.jar: System classpath에 복사합니다. (ex: `[solr 디렉터리]/server/lib/ext`)
- mecab-ko-lucene-analyzer-XX.jar: Solr contrib 디렉터리에 디렉터리를 생성후 복사합니다. (ex: `[solr 디렉터리]/contrib/eunjeon/lib`)
Expand Down Expand Up @@ -118,7 +120,7 @@ __주의 사항__
<!-- Korean -->
<dynamicField name="*_txt_ko" type="text_ko" indexed="true" stored="true"/>
<fieldType name="text_ko" class="solr.TextField" positionIncrementGap="100">
<analyzer>
<analyzer>
<tokenizer class="org.bitbucket.eunjeon.mecab_ko_lucene_analyzer.StandardTokenizerFactory" compoundNounMinLength="3"/>
</analyzer>
</fieldType>
Expand Down

0 comments on commit 4a2d17a

Please sign in to comment.