Skip to content

Commit

Permalink
Fix bump_version workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
kiron1 committed Jul 20, 2024
1 parent 1d075b9 commit 844f5d0
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 20 deletions.
16 changes: 10 additions & 6 deletions .github/workflows/bump_version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 [email protected]
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 }}
4 changes: 2 additions & 2 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 0 additions & 5 deletions tools/repin

This file was deleted.

14 changes: 7 additions & 7 deletions tools/version
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 844f5d0

Please sign in to comment.