Skip to content

testci

testci #13

Workflow file for this run

name: Release
on:
push:
tags:
- "v*"
jobs:
publish-release:
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ github.token }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get version
run: |
echo "RELEASE_VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
prev_version=$(gh release list | grep Latest | awk '{print $1}')
echo "PREV_VERSION=$prev_version" >> $GITHUB_ENV
- name: Write Changelog
run: |
prev_to_latest="${{ env.PREV_VERSION }}...${{ env.RELEASE_VERSION }}"
printf "\n\nFull Changelog: [\`${prev_to_latest}\`](https://github.com/${{ github.repository }}/compare/${prev_to_latest})" >> .CurrentChangelog.md
- name: Install Rye
shell: bash
env:
RYE_INSTALL_OPTION: "--yes"
RYE_VERSION: 0.43.0
run: |
curl -sSf https://rye.astral.sh/get | bash
echo "$HOME/.rye/shims" >> $GITHUB_PATH
- name: Install dependencies
run: |
rye sync
. .venv/bin/activate
- name: Rye Tests
run: |
rye test
- name: Build Wheel
run: |
rye build --clean
- name: Generate Checksums
working-directory: ./dist
run: |
while IFS= read -r filename; do
sha256sum "$filename" >> "checksums-${{ env.RELEASE_VERSION }}.txt"
done < <(ls -1)
- name: Create Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release create ${{ env.RELEASE_VERSION }} --draft --notes-file .CurrentChangelog.md --prerelease --title "${{ env.RELEASE_VERSION }}" --verify-tag
- name: Upload Wheel as Release Asset
working-directory: ./dist
run: |
gh release upload ${{ env.RELEASE_VERSION }} ./*.* --clobber
- name: Publish Release
run: |
gh release edit ${{ env.RELEASE_VERSION }} --draft=false --prerelease=false
- name: Upload artifacts
working-directory: ./dist
uses: actions/upload-artifact@v4

Check failure on line 76 in .github/workflows/release.yml

View workflow run for this annotation

GitHub Actions / Release

Invalid workflow file

The workflow is not valid. .github/workflows/release.yml (Line: 76, Col: 9): Unexpected value 'uses' .github/workflows/release.yml (Line: 77, Col: 9): Unexpected value 'with'
with:
name: artifact
path: ./*.*
# - name: Publish package distributions to PyPI
# uses: pypa/gh-action-pypi-publish@release/v1
# if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
# with:
# password: ${{ secrets.PYPI_API_TOKEN }}
# # password: ${{ secrets.TEST_PYPI_API_TOKEN }}
# # repository-url: https://test.pypi.org/legacy/