Merge pull request #2 from kymeria/no_clap_examples #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Pre-Release | |
on: | |
push: | |
tags: | |
- '[0-9]+.[0-9]+.[0-9]+' | |
- '[0-9]+.[0-9]+.[0-9]+-[0-9a-zA-Z]+' | |
permissions: | |
contents: write | |
jobs: | |
# The create-release job runs purely to initialize the GitHub release itself, | |
# and names the release after the `x.y.z` tag that was pushed. It's separate | |
# from building the release so that we only create the release once. | |
create-release: | |
name: create-release | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Get the release version from the tag | |
if: env.VERSION == '' | |
run: echo "VERSION=${{ github.ref_name }}" >> $GITHUB_ENV | |
- name: Show the version | |
run: | | |
echo "version is: $VERSION" | |
- name: Check that tag version and Cargo.toml version are the same | |
shell: bash | |
run: | | |
if ! grep -q "version = \"$VERSION\"" Cargo.toml; then | |
echo "version does not match Cargo.toml" >&2 | |
exit 1 | |
fi | |
- name: Create GitHub release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: gh release create $VERSION --draft --verify-tag --title $VERSION | |
outputs: | |
version: ${{ env.VERSION }} |