Skip to content

- Remove deprecated feature #8

- Remove deprecated feature

- Remove deprecated feature #8

Workflow file for this run

name: diff-match-patch-wasm CI
on:
push:
branches: [ main, ci* ]
tags: [ v* ]
pull_request:
branches: [ main ]
jobs:
get-info:
runs-on: ubuntu-latest
outputs:
commit-hash: ${{ steps.git-info.outputs.commit-hash }}
steps:
- uses: actions/checkout@v4
- name: Get git info
id: git-info
shell: bash
run: |
COMMIT_HASH=$(git rev-parse --short ${{ GITHUB.SHA }})
echo "commit-hash=$COMMIT_HASH" >> $GITHUB_OUTPUT
build:
runs-on: ubuntu-latest
needs: get-info
env:
OUTPUT_FOLDER: 'pkg'
RELEASE_FOLDER: 'release'
steps:
- uses: actions/checkout@v4
- name: Set up Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
target: 'wasm32-unknown-unknown'
- name: Build with wasm-pack
run: |
cargo install wasm-pack
wasm-pack build
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: diff-match-patch-wasm_${{ needs.get-info.outputs.commit-hash }}_#${{ GITHUB.RUN_NUMBER }}
path: ${{ env.OUTPUT_FOLDER }}
- name: Prepare for release
if: startsWith(github.ref, 'refs/tags/v')
shell: bash
run: |
mkdir -p ${{ env.RELEASE_FOLDER }}
7z a -tzip ${{ env.RELEASE_FOLDER }}/diff-match-patch-wasm.zip ${{ env.OUTPUT_FOLDER }}/*
- name: Create release
if: startsWith(github.ref, 'refs/tags/v')
uses: ncipollo/release-action@v1
with:
allowUpdates: true
artifacts: ${{ env.RELEASE_FOLDER }}/diff-match-patch-wasm.zip