Skip to content

Commit

Permalink
Fixup prepare-release.yml (#1356)
Browse files Browse the repository at this point in the history
  • Loading branch information
nowrep authored Jan 7, 2023
1 parent 8d2b750 commit e79f017
Showing 1 changed file with 26 additions and 2 deletions.
28 changes: 26 additions & 2 deletions .github/workflows/prepare-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,32 @@ jobs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
release_id: ${{ steps.create_release.outputs.id }}
steps:
- name: Configure git
run: git config --global core.autocrlf false

- uses: actions/checkout@v2

- uses: actions-rs/toolchain@v1
with:
toolchain: stable

- name: Bump version
id: bump_version
env:
RUST_BACKTRACE: 1
run: |
$versionarg = "${{ github.event.inputs.version }}"
$versionarg = If ($versionarg.Length -gt 0) { "--version $versionarg" } else { "" }
$out = cargo xtask bump $versionarg.split()
echo $out
cargo update -p alvr_common
echo "::set-output name=version_tag::$(echo $out | sls -CaseSensitive -Pattern '^v.*$')"
- name: Push changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "[Auto] Bump version"

- name: Output ref for later checkouts
id: output_ref
run: echo "::set-output name=release_ref::$(git rev-parse HEAD)"
Expand All @@ -31,8 +55,8 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.event.inputs.version }}
release_name: ALVR ${{ github.event.inputs.version }}
tag_name: ${{ steps.bump_version.outputs.version_tag }}
release_name: ALVR ${{ steps.bump_version.outputs.version_tag }}
draft: true
prerelease: false
commitish: ${{ steps.output_ref.outputs.release_ref }}
Expand Down

0 comments on commit e79f017

Please sign in to comment.