add Ruby 3.4.0 to the build matrix #126
Workflow file for this run
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: build release binaries | |
on: | |
pull_request: | |
release: | |
types: [created] | |
permissions: | |
contents: write | |
id-token: write | |
attestations: write | |
jobs: | |
build: | |
name: build | |
runs-on: ubuntu-latest | |
steps: | |
- run: sudo apt-get install gettext | |
- uses: actions/checkout@v4 | |
- name: build mecab | |
run: | | |
./autogen.sh | |
./configure | |
make -j$(nproc) all | |
sudo make install | |
make dist | |
mkdir -p ../dist/mecab/ | |
mv mecab-*.tar.gz ../dist/mecab/ | |
make script-dist | |
mkdir -p ../dist/scripts/ | |
mv mecab-*.tar.gz ../dist/scripts/ | |
mecab-config --version > ../dist/mecab-version.txt | |
working-directory: mecab | |
- name: build ipadic | |
run: | | |
./autogen.sh | |
./configure | |
make dist | |
mkdir -p ../dist/mecab-ipadic/ | |
mv mecab-ipadic-*.tar.gz ../dist/mecab-ipadic/ | |
working-directory: mecab-ipadic | |
- name: build jumandic | |
run: | | |
./autogen.sh | |
./configure | |
make dist | |
mkdir -p ../dist/mecab-jumandic/ | |
mv mecab-jumandic-*.tar.gz ../dist/mecab-jumandic/ | |
working-directory: mecab-jumandic | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: dist | |
path: dist | |
- name: Upload Release Assets | |
uses: shogo82148/actions-upload-release-asset@v1 | |
with: | |
upload_url: ${{ github.event.release.upload_url }} | |
asset_path: | | |
dist/**/*.tar.gz | |
if: github.event_name == 'release' | |
- name: Generate artifact attestation | |
uses: actions/attest-build-provenance@v2 | |
with: | |
subject-path: | | |
dist/**/*.tar.gz | |
if: github.event_name == 'release' | |
windows: | |
name: windows | |
runs-on: windows-2019 | |
needs: build | |
strategy: | |
fail-fast: false | |
matrix: | |
machine: | |
- x64 | |
- x86 | |
steps: | |
- run: git config --global core.autoCRLF false | |
- uses: actions/checkout@v4 | |
- uses: actions/download-artifact@v4 | |
with: | |
name: dist | |
path: dist | |
- name: check mecab version | |
id: mecab | |
run: | | |
echo "version=$(cat mecab-version.txt)" >> "$GITHUB_OUTPUT" | |
shell: bash | |
working-directory: dist | |
- name: untar mecab | |
run: | | |
tar xzvf mecab-*.tar.gz | |
rm mecab-*.tar.gz | |
mv mecab-*/* . | |
shell: bash | |
working-directory: dist/mecab | |
- name: untar ipadic | |
run: | | |
tar xzvf mecab-ipadic-*.tar.gz | |
rm mecab-ipadic-*.tar.gz | |
mv mecab-ipadic-*/* . | |
shell: bash | |
working-directory: dist/mecab-ipadic | |
- name: untar python binding | |
run: | | |
tar xzvf mecab-python-*.tar.gz | |
rm mecab-*.tar.gz | |
mv mecab-python-*/* . | |
shell: bash | |
working-directory: dist/scripts | |
- name: build | |
run: call .github\build-windows.bat | |
shell: cmd | |
env: | |
BUILD_TYPE: ${{ matrix.machine }} | |
MECAB_VERSION: ${{ steps.mecab.outputs.version }} | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: mecab-msvc-${{ matrix.machine }}-${{ steps.mecab.outputs.version }}.zip | |
path: dist/mecab-msvc-${{ matrix.machine }}-${{ steps.mecab.outputs.version }}.zip | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: python-wheel-${{ matrix.machine }} | |
path: | | |
dist/mecab-msvc-*.zip | |
dist/scripts/*.whl | |
- name: Upload Release Assets | |
uses: shogo82148/actions-upload-release-asset@v1 | |
with: | |
upload_url: ${{ github.event.release.upload_url }} | |
asset_path: | | |
dist/mecab-msvc-*.zip | |
dist/scripts/*.whl | |
if: github.event_name == 'release' | |
- name: Generate artifact attestation | |
uses: actions/attest-build-provenance@v2 | |
with: | |
subject-path: | | |
dist/mecab-msvc-*.zip | |
dist/scripts/*.whl | |
if: github.event_name == 'release' |