chore: bump version to v0.1.22 #22
Workflow file for this run
This file contains hidden or 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: Release | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| jobs: | |
| build-native: | |
| name: Build Rust (${{ matrix.target }}) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| include: | |
| - target: x86_64-apple-darwin | |
| os: macos-latest | |
| suffix: darwin-x64 | |
| - target: aarch64-apple-darwin | |
| os: macos-latest | |
| suffix: darwin-arm64 | |
| - target: x86_64-unknown-linux-gnu | |
| os: ubuntu-latest | |
| suffix: linux-x64 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: ${{ matrix.target }} | |
| - name: Install build dependencies (Linux) | |
| if: runner.os == 'Linux' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y protobuf-compiler | |
| - name: Install build dependencies (macOS) | |
| if: runner.os == 'macOS' | |
| run: | | |
| brew install protobuf | |
| - name: Build | |
| run: | | |
| cd rust-core | |
| cargo build --release --target ${{ matrix.target }} | |
| - name: Rename binary | |
| run: | | |
| cp rust-core/target/${{ matrix.target }}/release/codeseek codeseek-${{ matrix.suffix }} | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: codeseek-${{ matrix.suffix }} | |
| path: codeseek-${{ matrix.suffix }} | |
| release: | |
| name: Create Release | |
| needs: build-native | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| path: artifacts | |
| - name: Organize artifacts | |
| run: | | |
| mkdir -p release | |
| cp artifacts/codeseek-darwin-x64/codeseek-darwin-x64 release/ | |
| cp artifacts/codeseek-darwin-arm64/codeseek-darwin-arm64 release/ | |
| cp artifacts/codeseek-linux-x64/codeseek-linux-x64 release/ | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| files: release/* | |
| generate_release_notes: true | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| publish-npm: | |
| name: Publish to npm | |
| needs: build-native | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| registry-url: 'https://registry.npmjs.org' | |
| - name: Install dependencies & build | |
| run: | | |
| npm install | |
| npm run build | |
| - name: Publish | |
| run: npm publish --access public | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |