diff --git a/.github/workflows/bump_version.yaml b/.github/workflows/bump_version.yaml index 8ab80e56..7761e553 100644 --- a/.github/workflows/bump_version.yaml +++ b/.github/workflows/bump_version.yaml @@ -31,23 +31,27 @@ jobs: - name: Bump version of proxydetox run: | - cargo set-version --bump ${{ github.event.inputs.release_kind }} + cargo set-version --bump "${KIND}" + env: + KIND: ${{ github.event.inputs.release_kind }} - name: Cargo update run: | - ./tools/repin + cargo update - name: Get new version id: new_version run: | - ./tools/version + ./tools/version | tee -a "${GITHUB_OUTPUT}" - name: Create PR run: | git config user.name github-actions git config user.email github-actions@github.com git add . - git commit -m "Version ${{ steps.new_version.outputs.version }}" - git tag "v${{ steps.new_version.outputs.version }}" - git push + git commit -m "Version ${VERSION}" + git tag "v${VERSION}" git push --tags + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + VERSION: ${{ steps.new_version.outputs.version }} diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index ece5bd6e..045369c4 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -39,11 +39,11 @@ jobs: - name: Version id: version run: | - ./tools/version | tee -a $GITHUB_OUTPUT + ./tools/version | tee -a "${GITHUB_OUTPUT}" - name: Rev id: rev run: | - printf 'rev=%s\n' $(git rev-parse --short HEAD) | tee -a $GITHUB_OUTPUT + printf 'rev=%s\n' "$(git rev-parse --short HEAD)" | tee -a "${GITHUB_OUTPUT}" bazel_test: name: Bazel test diff --git a/tools/repin b/tools/repin deleted file mode 100755 index 25846df9..00000000 --- a/tools/repin +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env sh - -set -eu - -bazel sync --repo_env=CARGO_BAZEL_REPIN=1 --only=crate_index --only=crate_index_tools diff --git a/tools/version b/tools/version index 795ae5bc..5bcd8e03 100755 --- a/tools/version +++ b/tools/version @@ -7,13 +7,13 @@ prefix="version=" while getopts "r" o; do case "${o}" in - r) - prefix="" - ;; - *) - echo "fatal error: invalid arguments" - exit 1 - ;; + r) + prefix="" + ;; + *) + echo "fatal error: invalid arguments" + exit 1 + ;; esac done shift $((OPTIND - 1))