bump version to v1.0.7 #223
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: Tpi Validation Pipeline | |
on: [push] | |
jobs: | |
cargo-clippy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- run: rustup component add clippy | |
- uses: actions-rs/clippy-check@v1 | |
with: | |
token: '${{ secrets.GITHUB_TOKEN }}' | |
args: '--all-features' | |
cargo-deny: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: EmbarkStudios/cargo-deny-action@v1 | |
with: | |
command: check bans licenses sources | |
cargo-test: | |
runs-on: ubuntu-latest | |
needs: cargo-deny | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
default: true | |
profile: minimal | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: test | |
- name: Extract version from Cargo.toml | |
id: extract_version | |
run: | | |
VERSION=$(grep '^version = ' Cargo.toml | sed -E 's/version = "(.*)"/\1/') | |
echo "VERSION=$VERSION" >> $GITHUB_ENV | |
- name: Check if tag exists | |
id: check_tag | |
run: | | |
if git rev-parse --verify v${VERSION} >/dev/null 2>&1; then | |
echo "TAG_EXISTS=true" >> $GITHUB_ENV | |
else | |
echo "TAG_EXISTS=false" >> $GITHUB_ENV | |
fi | |
- name: Create new tag | |
if: ${{ env.TAG_EXISTS == 'false' }} | |
run: | | |
git config --global user.name "${{ github.actor }}" | |
git config --global user.email "[email protected]" | |
git tag -a "v${{ env.VERSION }}" -m "Release version ${{ env.VERSION }}" | |
git push origin "v${{ env.VERSION }}" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |