This repository has been archived by the owner on Nov 1, 2024. It is now read-only.
fix: degoogle homepage (#23) #10
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[0-9]+.[0-9]+.[0-9]+ | |
jobs: | |
inspect: | |
runs-on: ubuntu-latest | |
container: python:3.10 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Get the version from the tag. | |
id: get_version | |
run: echo ::set-output name=version::${GITHUB_REF:11} | |
shell: bash | |
# see https://github.com/actions/runner-images/issues/6775 | |
# newer versions of Git check ownership of multi-user repositories | |
# and will fail if one attempts to run Git in the checkout. | |
- name: Workaround dubious ownership Git security check | |
id: workaround_dubious_ownership | |
run: git config --global --add safe.directory /__w/site-generator/site-generator | |
- name: Get the release notes from the previous release to this one. | |
id: release_tool | |
run: python ./.github/release_notes.py | |
outputs: | |
version: ${{ steps.get_version.outputs.version }} | |
release_notes: ${{ steps.release_tool.outputs.release_notes }} | |
github_release: | |
runs-on: ubuntu-latest | |
needs: inspect | |
steps: | |
- name: Create the GitHub release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
with: | |
tag_name: v${{ needs.inspect.outputs.version }} | |
release_name: aep-site-generator ${{ needs.inspect.outputs.version }} | |
body: ${{ needs.inspect.outputs.release_notes }} | |
draft: false | |
prerelease: false | |
pypi_release: | |
runs-on: ubuntu-latest | |
container: python:3.10 | |
needs: | |
- inspect | |
- github_release | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install twine. | |
run: pip install twine | |
- name: Set the version number. | |
run: | | |
cat > VERSION <<EOF | |
${{ needs.inspect.outputs.version }} | |
EOF | |
- name: Create a source distribution. | |
run: python setup.py sdist | |
- name: Upload to PyPI. | |
run: twine upload dist/* | |
env: | |
TWINE_USERNAME: __token__ | |
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} | |
TWINE_NON_INTERACTIVE: 1 |