-
-
Notifications
You must be signed in to change notification settings - Fork 313
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
5 changed files
with
47 additions
and
42 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,9 @@ permissions: | |
contents: read | ||
id-token: write | ||
|
||
env: | ||
FORCE_COLOR: "1" | ||
|
||
# https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/ | ||
jobs: | ||
# Always build & lint package. | ||
|
@@ -46,27 +49,21 @@ jobs: | |
id-token: write | ||
contents: write | ||
steps: | ||
- name: Fetch version | ||
id: version | ||
run: | | ||
VERSION=${GITHUB_HEAD_REF#release-} | ||
echo Version: $VERSION | ||
echo "VERSION=$VERSION" >> $GITHUB_ENV | ||
- name: Push tag with version | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Tag the commit | ||
run: | | ||
git tag --annotate --message="Release version ${{ VERSION }}" ${{ VERSION }} ${{ github.sha }} | ||
git push origin ${{ VERSION }} | ||
- name: Tag the commit | ||
run: | | ||
RELEASE_VERSION=${GITHUB_HEAD_REF#release-} | ||
echo Release version: $RELEASE_VERSION | ||
git config user.name 'subliminal bot' | ||
git config user.email [email protected] | ||
git tag --annotate --message="Release version $RELEASE_VERSION" $RELEASE_VERSION ${{ github.sha }} | ||
git push origin $RELEASE_VERSION | ||
github-release: | ||
name: Make a GitHub Release and upload Python package. | ||
name: Make a GitHub Release. | ||
needs: [build-package] | ||
if: github.repository == 'Diaoul/subliminal' && startsWith(github.ref, 'refs/tags/') # only publish a Github release on push tag | ||
runs-on: ubuntu-latest | ||
|
@@ -93,6 +90,7 @@ jobs: | |
draft: true | ||
|
||
publish-to-pypi: | ||
name: Publish package to pypi. | ||
needs: [build-package] | ||
environment: | ||
name: 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
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