From 2a81e5b611d6c0136ceba76b69e8d2da7f6fa7c2 Mon Sep 17 00:00:00 2001 From: Dennis Dyatlov Date: Wed, 6 Nov 2024 12:20:57 +0000 Subject: [PATCH] add step for updating contract template --- .github/workflows/rs-release.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/rs-release.yml b/.github/workflows/rs-release.yml index f313c88d..0058baa2 100644 --- a/.github/workflows/rs-release.yml +++ b/.github/workflows/rs-release.yml @@ -148,6 +148,17 @@ jobs: done cat Cargo.toml cargo login ${{ secrets.CRATES_IO_TOKEN }} + git checkout -- . + + - name: Update Contract Template + run: | + VERSION=${{ needs.prepare.outputs.r_version }} + sed -i -E "s/(variable::set\(\"sails-rs-version\", \")([^\"]+)(\"\);)/\1=$VERSION\3/" templates/set-vars.rhai + git config --global user.name "$GITHUB_USER_NAME" + git config --global user.email "$GITHUB_USER_EMAIL" + git add templates/set-vars.rhai + git commit -m "build(tmpl): update version to v${{ needs.prepare.outputs.r_version }} in contract template" + git push origin "${{ needs.prepare.outputs.rc_branch }}" release: name: Create Release