testci #13
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: 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 GitHub Actions / ReleaseInvalid workflow file
|
||
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/ |