-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: prepping docs and actions for initial release
- Loading branch information
1 parent
11b408a
commit 6116e20
Showing
6 changed files
with
88 additions
and
58 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,8 +2,7 @@ name: Publish Release | |
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
tags: ['*'] | ||
|
||
defaults: | ||
run: | ||
|
@@ -41,49 +40,56 @@ jobs: | |
- name: Store dist artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: typelib-dist | ||
name: python-package-distributions | ||
path: dist | ||
|
||
publish-pypi: | ||
runs-on: ${{ matrix.os }} | ||
needs: [ build-wheels, build-sdist ] | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ ubuntu-latest ] | ||
python-version: [ "3.9" ] | ||
publish-to-pypi: | ||
name: >- | ||
Publish Python 🐍 distribution 📦 to PyPI | ||
needs: | ||
- build-wheels | ||
- build-sdist | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: pypi | ||
url: https://pypi.org/p/typelib | ||
permissions: | ||
id-token: write # IMPORTANT: mandatory for trusted publishing | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ./.github/actions/bootstrap-environ | ||
id: bootstrap-environ | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
runner: ubuntu-latest | ||
- name: Download distribution artifact | ||
- name: Download all the dists | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: typelib-dist | ||
path: dist | ||
- name: Publish to PyPI | ||
run: poetry publish -u $PYPI_USERNAME -p $PYPI_PASSWORD | ||
env: | ||
PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }} | ||
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | ||
name: python-package-distributions | ||
path: dist/ | ||
- name: Publish distribution 📦 to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
|
||
create-release: | ||
needs: [ build-wheels, build-sdist ] | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ ubuntu-latest ] | ||
python-version: [ "3.9" ] | ||
name: >- | ||
Sign the Python 🐍 distribution 📦 with Sigstore | ||
and upload them to GitHub Release | ||
needs: | ||
- publish-to-pypi | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write # IMPORTANT: mandatory for making GitHub Releases | ||
id-token: write # IMPORTANT: mandatory for sigstore | ||
|
||
steps: | ||
- name: Download distribution artifact | ||
- uses: actions/checkout@v4 | ||
- uses: ./.github/actions/bootstrap-environ | ||
- name: Download all the dists | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: typelib-dist | ||
path: dist | ||
name: python-package-distributions | ||
path: dist/ | ||
- name: Sign the dists with Sigstore | ||
uses: sigstore/[email protected] | ||
with: | ||
inputs: >- | ||
./dist/*.tar.gz | ||
./dist/*.whl | ||
- name: Compile Release Notes | ||
run: make release-notes > release-notes.md | ||
- name: Report Version | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,10 @@ defaults: | |
run: | ||
shell: bash | ||
|
||
env: | ||
GIT_COMMITTER_NAME: "github-actions[bot]" | ||
GIT_COMMITTER_EMAIL: "41898282+github-actions[bot]@users.noreply.github.com" | ||
|
||
jobs: | ||
create-version: | ||
runs-on: ${{ matrix.os }} | ||
|
@@ -34,12 +38,7 @@ jobs: | |
with: | ||
python-version: ${{ matrix.python-version }} | ||
runner: ${{ matrix.os }} | ||
# In order to make a commit, we need to initialize a user. | ||
- name: Initialize mandatory git config | ||
run: | | ||
git config user.name "GitHub actions" | ||
git config user.email [email protected] | ||
- name: Tag New Version | ||
run: make release-version rule=${{ inputs.level }} | ||
- name: Push New Version | ||
run: git push --follow-tags origin ${{ github.ref_name}} | ||
run: git push --follow-tags origin ${{ github.ref_name }} |
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
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