Append C-API artifact to latest release #122
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
| on: | |
| release: | |
| types: [published] | |
| workflow_run: | |
| workflows: | |
| - Release | |
| types: | |
| - completed | |
| pull_request: | |
| types: [labeled] | |
| name: Append C-API artifact to latest release | |
| jobs: | |
| deploy_linux_binaries: | |
| if: ${{ github.event.action == 'completed' || github.event.label.name == 'test-release-process' || (github.event_name == 'release' && github.event.action == 'published') }} | |
| runs-on: ubuntu-22.04 | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| steps: | |
| - id: latest-release | |
| uses: pozetroninc/[email protected] | |
| with: | |
| repository: ${{ github.repository }} | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - uses: actions/checkout@v2 | |
| - uses: actions-rs/[email protected] | |
| with: | |
| toolchain: stable | |
| profile: minimal | |
| - uses: Swatinem/[email protected] | |
| - run: cargo build --release --package graphannis-capi | |
| - run: mv target/release/libgraphannis_capi.so target/release/libgraphannis.so | |
| - name: Upload graphANNIS shared library | |
| uses: ncipollo/release-action@v1 | |
| with: | |
| allowUpdates: true | |
| artifacts: "./target/release/libgraphannis.so" | |
| artifactContentType: application/x-sharedlib | |
| tag: ${{ steps.latest-release.outputs.release}} | |
| omitBodyDuringUpdate: true | |
| omitDraftDuringUpdate: true | |
| omitNameDuringUpdate: true | |
| omitPrereleaseDuringUpdate: true | |
| deploy_windows_binaries: | |
| if: ${{ github.event.action == 'completed' || github.event.label.name == 'test-release-process' || (github.event_name == 'release' && github.event.action == 'published') }} | |
| runs-on: windows-2025 | |
| steps: | |
| - id: latest-release | |
| uses: pozetroninc/[email protected] | |
| with: | |
| repository: ${{ github.repository }} | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - uses: actions/checkout@v2 | |
| - uses: actions-rs/[email protected] | |
| with: | |
| toolchain: stable | |
| profile: minimal | |
| - uses: Swatinem/[email protected] | |
| - run: cargo build --release --package graphannis-capi | |
| - run: Rename-Item -Path "target\release\graphannis_capi.dll" -NewName "graphannis.dll" | |
| - name: Upload graphANNIS shared library | |
| uses: ncipollo/release-action@v1 | |
| with: | |
| allowUpdates: true | |
| artifacts: "./target/release/graphannis.dll" | |
| artifactContentType: application/x-dosexec | |
| tag: ${{ steps.latest-release.outputs.release}} | |
| omitBodyDuringUpdate: true | |
| omitDraftDuringUpdate: true | |
| omitNameDuringUpdate: true | |
| omitPrereleaseDuringUpdate: true | |
| deploy_macos_binaries: | |
| if: ${{ github.event.action == 'completed' || github.event.label.name == 'test-release-process' || (github.event_name == 'release' && github.event.action == 'published') }} | |
| runs-on: macos-14 | |
| steps: | |
| - id: latest-release | |
| uses: pozetroninc/[email protected] | |
| with: | |
| repository: ${{ github.repository }} | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - uses: actions/checkout@v2 | |
| - uses: actions-rs/[email protected] | |
| with: | |
| toolchain: stable | |
| profile: minimal | |
| - uses: Swatinem/[email protected] | |
| - run: cargo build --release --package graphannis-capi | |
| - run: mv target/release/libgraphannis_capi.dylib target/release/libgraphannis.dylib | |
| - name: Upload graphANNIS shared library | |
| uses: ncipollo/release-action@v1 | |
| with: | |
| allowUpdates: true | |
| artifacts: "./target/release/libgraphannis.dylib" | |
| artifactContentType: application/x-mach-binary | |
| tag: ${{ steps.latest-release.outputs.release}} | |
| omitBodyDuringUpdate: true | |
| omitDraftDuringUpdate: true | |
| omitNameDuringUpdate: true | |
| omitPrereleaseDuringUpdate: true |