-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: move to upstream semantic-release
- Loading branch information
Showing
8 changed files
with
106 additions
and
33 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 |
---|---|---|
|
@@ -238,40 +238,47 @@ jobs: | |
- docker-image | ||
- pre-commit | ||
- tensorflow | ||
concurrency: release | ||
steps: | ||
- uses: tibdex/github-app-token@v1 | ||
if: ${{ github.event_name != 'pull_request' }} | ||
id: generate_token | ||
with: | ||
app_id: ${{ secrets.APP_ID }} | ||
private_key: ${{ secrets.APP_PRIVATE_KEY }} | ||
|
||
- uses: actions/checkout@v2 | ||
if: ${{ github.event_name != 'pull_request' }} | ||
with: | ||
fetch-depth: 0 | ||
token: ${{ steps.generate_token.outputs.token }} | ||
|
||
- uses: actions/checkout@v2 | ||
if: ${{ github.event_name == 'pull_request' }} | ||
- uses: cachix/install-nix-action@v16 | ||
with: | ||
fetch-depth: 0 | ||
nix_path: nixpkgs=channel:nixos-unstable-small | ||
|
||
- run: git config --global user.name "github-actions" | ||
- run: git config --global user.email "[email protected]" | ||
- uses: cachix/cachix-action@v10 | ||
with: | ||
name: stupidb | ||
extraPullNames: nix-community,poetry2nix | ||
|
||
- uses: actions/setup-python@v2 | ||
- name: setup nodejs | ||
uses: actions/setup-node@v2 | ||
with: | ||
python-version: "3.x" | ||
node-version: 16 | ||
|
||
- run: pip install poetry python-semantic-release | ||
- name: run semantic-release | ||
run: | | ||
set -euo pipefail | ||
- run: semantic-release publish --verbosity=DEBUG | ||
if: ${{ github.event_name != 'pull_request' }} | ||
npx \ | ||
-p semantic-release \ | ||
-p "@semantic-release/commit-analyzer" \ | ||
-p "@semantic-release/release-notes-generator" \ | ||
-p "@semantic-release/changelog" \ | ||
-p "@semantic-release/github" \ | ||
-p "@semantic-release/exec"\ | ||
-p "@semantic-release/git" \ | ||
semantic-release \ | ||
--ci | ||
env: | ||
GH_TOKEN: ${{ steps.generate_token.outputs.token }} | ||
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} | ||
|
||
- run: semantic-release publish --noop --verbosity=DEBUG | ||
if: ${{ github.event_name == 'pull_request' }} | ||
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }} | ||
GIT_CREDENTIALS: ${{ steps.generate_token.outputs.token }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{ | ||
"branches": ["main"], | ||
"plugins": [ | ||
"@semantic-release/commit-analyzer", | ||
"@semantic-release/release-notes-generator", | ||
[ | ||
"@semantic-release/changelog", | ||
{ | ||
"changelogTitle": "# Release Notes" | ||
} | ||
], | ||
[ | ||
"@semantic-release/exec", | ||
{ | ||
"verifyConditionsCmd": "ci/release/verify.sh", | ||
"prepareCmd": "ci/release/prepare.sh ${nextRelease.version}", | ||
"publishCmd": "ci/release/publish.sh" | ||
} | ||
], | ||
[ | ||
"@semantic-release/github", | ||
{ | ||
"assets": ["dist/*.whl"] | ||
} | ||
], | ||
[ | ||
"@semantic-release/git", | ||
{ | ||
"assets": ["pyproject.toml", "CHANGELOG.md"], | ||
"message": "chore(release): ${nextRelease.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 |
---|---|---|
@@ -1,6 +1,4 @@ | ||
# Changelog | ||
|
||
<!--next-version-placeholder--> | ||
# Release Notes | ||
|
||
## v0.7.1 (2021-12-24) | ||
### Documentation | ||
|
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/usr/bin/env nix-shell | ||
#!nix-shell --pure -p poetry -i bash | ||
# shellcheck shell=bash | ||
|
||
set -euo pipefail | ||
|
||
# set version | ||
poetry version "$1" | ||
|
||
# build artifacts | ||
poetry build |
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/usr/bin/env nix-shell | ||
#!nix-shell --pure --keep POETRY_PYPI_TOKEN_PYPI -p poetry -i bash | ||
# shellcheck shell=bash | ||
|
||
set -euo pipefail | ||
|
||
poetry publish |
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/usr/bin/env nix-shell | ||
#!nix-shell --pure --keep POETRY_PYPI_TOKEN_PYPI -p poetry -p git -i bash | ||
# shellcheck shell=bash | ||
|
||
set -euo pipefail | ||
|
||
# verify TOML is sane | ||
poetry check | ||
|
||
# verify that the lock file is up to date | ||
poetry lock --no-update | ||
git diff --exit-code poetry.lock | ||
|
||
# verify that we have a token available to push to pypi using set -u | ||
: "${POETRY_PYPI_TOKEN_PYPI}" |
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