From 384efaeed1cc8935943e4f1bf457844f4e86ee50 Mon Sep 17 00:00:00 2001 From: David Stangl Date: Tue, 14 Feb 2023 14:35:16 +0100 Subject: [PATCH] Fix publish.yaml again --- .github/workflows/publish.yaml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index cb63bcb..6bd11bd 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -22,28 +22,32 @@ jobs: id: calc_version uses: rymndhng/release-on-push-action@master with: - bump_version_scheme: norelease + bump_version_scheme: patch tag_prefix: "" dry_run: true env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Set version + if: ${{ steps.calc_version.outputs.version }} != "" run: | sed -i "s/^version = \".*\"$/version = \"${{ steps.calc_version.outputs.version }}\"/" Cargo.toml - name: Publish new version to main + if: ${{ steps.calc_version.outputs.version }} != "" run: | git config --global user.email "rust-maintainers@moiaorg.onmicrosoft.com" git config --global user.name "MOIA Rust Maintainers" git commit -am "Release ${{ steps.calc_version.outputs.version }}" git push - name: Create github release + if: ${{ steps.calc_version.outputs.version }} != "" uses: rymndhng/release-on-push-action@master with: - bump_version_scheme: norelease + bump_version_scheme: patch tag_prefix: "" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Publish + if: ${{ steps.calc_version.outputs.version }} != "" run: cargo publish env: CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}