Bump version to 3.1.0 #7
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: Release Pipeline | |
on: | |
push: | |
tags: | |
- v*.*.* | |
workflow_dispatch: | |
jobs: | |
crates: | |
name: 'Upload to crates.io' | |
runs-on: ubuntu-latest | |
container: 'precice/ci-ubuntu-2204:latest' | |
steps: | |
- name: Get verison from tag | |
id: tag | |
uses: dawidd6/action-get-tag@v1 | |
with: | |
strip_v: true | |
- name: Install common dependencies | |
run: | | |
apt-get -yy update | |
apt-get -yy upgrade | |
apt-get -yy install cargo | |
- name: Install preCICE | |
run: | | |
# 2.5.4 -> 2.5.0 (always picks minor version 0 of precice) | |
export preciceVersion="$( echo '${{ steps.tag.outputs.tag }}' | sed 's/^\([0-9]\+\.[0-9]\+\)\.[0-9]\+/\1.0/' )" | |
# 2.5.0 -> libprecice2_2.5.0_codename.deb | |
export debPackage="$( echo $preciceVersion | sed 's/^\([0-9]\+\)\.\([0-9]\+\.[0-9]\+\)/libprecice\1_\1.\2/' )_$(lsb_release -sc).deb" | |
wget -q -O libprecice.deb https://github.com/precice/precice/releases/download/v${preciceVersion}/${debPackage} | |
apt-get -yy install ./libprecice.deb | |
rm libprecice.deb | |
- uses: actions/checkout@v4 | |
- name: Try to build first | |
run: cargo build --release | |
- name: Try to build examples | |
run: cargo build --release --examples | |
- name: Publish | |
env: | |
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} | |
run: cargo publish |