Skip to content

Update version to 0.2.0rc1 #39

Update version to 0.2.0rc1

Update version to 0.2.0rc1 #39

name: Create new release
on:
pull_request:
branches:
- main
types:
- closed
env:
tag-prefix: "v"
jobs:
push-tag:
name: Push a tag
if: ${{ contains(github.event.pull_request.labels.*.name, 'new release') && github.event.pull_request.merged }}
runs-on: ubuntu-latest
permissions:
contents: write
outputs:
version: ${{ steps.tag.outputs.version }}
tag: ${{ steps.tag.outputs.tag }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Hatch
uses: pypa/hatch@install
- name: Configure git
run: |
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
- name: Push a tag
id: tag
run: |
version="$(hatch version)"
tag="${{ env.tag-prefix }}${version}"
git tag -a ${tag} -m "New release ${tag} (tagged by github-actions[bot])"
git push origin ${tag}
echo "version=${version}" >> $GITHUB_OUTPUT
echo "tag=${tag}" >> $GITHUB_OUTPUT
build-package:
needs:
- push-tag
uses: ./.github/workflows/build-pip-package.yml
with:
version: ${{ needs.push-tag.outputs.version }}
build-docs:
needs:
- push-tag
uses: ./.github/workflows/build-docs.yml
with:
version: ${{ needs.push-tag.outputs.version }}

Check failure on line 57 in .github/workflows/create-new-release.yml

View workflow run for this annotation

GitHub Actions / Create new release

Invalid workflow file

The workflow is not valid. .github/workflows/create-new-release.yml (Line: 57, Col: 16): Invalid input, version is not defined in the referenced workflow.
create-release:
name: Create a release
runs-on: ubuntu-latest
needs:
- push-tag
- build-package
- build-docs
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Download artifacts
uses: actions/download-artifact@v4
with:
path: dist
merge-multiple: true
- name: Create a release
uses: softprops/action-gh-release@v2
with:
draft: true
tag_name: ${{ needs.push-tag.outputs.tag }}
generate_release_notes: true
files: dist/*