-
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.
ci: run semantic-release through poetry
- Loading branch information
Brice Santus
committed
Sep 23, 2023
1 parent
bc11b52
commit e98c2e6
Showing
2 changed files
with
29 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -56,6 +56,9 @@ jobs: | |
if: github.event_name == 'push' && github.ref == 'refs/heads/main' | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
ref: ${{ github.ref_name }} | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10.13" | ||
|
@@ -66,8 +69,25 @@ jobs: | |
virtualenvs-create: true | ||
virtualenvs-in-project: false | ||
installer-parallel: true | ||
- name: Semantic Release | ||
run: | | ||
git config user.name github-actions | ||
git config user.email [email protected] | ||
semantic-release publish | ||
- name: Load cached venv | ||
id: cached-poetry-dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: .venv | ||
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }} | ||
|
||
- name: Install dependencies | ||
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | ||
run: poetry install --no-interaction --no-root | ||
|
||
- name: Install project | ||
run: poetry install --no-interaction | ||
|
||
- name: Build project | ||
run: poetry build | ||
|
||
- name: Python Semantic Release | ||
uses: python-semantic-release/python-semantic-release@master | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
PyPI_TOKEN: ${{secrets.PYPI_TOKEN}} |
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