Skip to content

Commit

Permalink
fix the failure of update-verison yaml script
Browse files Browse the repository at this point in the history
  • Loading branch information
tamada committed Apr 20, 2024
1 parent fed8d14 commit a328484
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions .github/workflows/update-version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,25 @@ jobs:
run: |
echo "GITHUB_REF: $GITHUB_REF"
echo "tag=${GITHUB_REF##*/v}" >> $GITHUB_OUTPUT
- name: Update version
run: |
sed "s/^version = \".*\"/version = \"${{ steps.vars.outputs.tag }}\"/" Cargo.toml > a ; mv a Cargo.toml
sed "s/\$VERSION/${{ steps.vars.outputs.tag }}/g" templates/README.md > a ; mv a README.md
- name: Commit version
- name: Initialize Git
shell: bash
run: |
git config --global user.email "
git config --global user.name "GitHub Actions"
git config --global user.email "action@github.com"
auth_header="$(git config --local --get http.https://github.com/.extraheader)"
- name: Commit the changes
run: |
git commit -a -m "update version to ${{ steps.vars.outputs.tag }}, ready to publish v${{ steps.vars.outputs.tag }}" || true
- name: Push branch
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ steps.vars.outputs.branch }}

0 comments on commit a328484

Please sign in to comment.