-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
9 additions
and
3 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 |
---|---|---|
|
@@ -23,12 +23,17 @@ jobs: | |
- uses: actions/checkout@v2 | ||
- uses: DeterminateSystems/nix-installer-action@main | ||
- uses: DeterminateSystems/magic-nix-cache-action@main | ||
|
||
- name: Load dependency cache | ||
id: load-cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: .venv | ||
key: app-${{ runner.os }}-python-${{ env.pythonLocation }}-${{ hashFiles('poetry.lock') }} | ||
- name: Install dependencies | ||
run: | | ||
nix develop -c poetry config virtualenvs.in-project true | ||
nix develop -c poetry install | ||
if: steps.load-cache.outputs.cache-hit != 'true' | ||
- name: Check code style | ||
if: github.event_name != 'push' | ||
run: | | ||
|
@@ -81,12 +86,13 @@ jobs: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} | ||
run: | | ||
source .venv/bin/activate | ||
git config --global user.name "github-actions" | ||
git config --global user.email "[email protected]" | ||
export GH_TOKEN="${GITHUB_TOKEN}" | ||
export REPOSITORY_USERNAME="__token__" | ||
export REPOSITORY_PASSWORD="${PYPI_TOKEN}" | ||
nix develop -c poetry run python -m semantic_release publish -D commit_author="github-actions <[email protected]>" | ||
python -m semantic_release publish -D commit_author="github-actions <[email protected]>" | ||
- name: Save release commit hash | ||
id: release-commit-hash | ||
run: echo "::set-output name=release-commit-hash::$(git rev-parse HEAD)" | ||
|