-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Add a exaslct script to pyproject.toml which gets installed during package install * Change release trigger from release_droid to creating a tag
- Loading branch information
Showing
8 changed files
with
111 additions
and
94 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 |
---|---|---|
@@ -1,22 +1,48 @@ | ||
name: Release | ||
name: Build & Publish | ||
|
||
on: | ||
release: | ||
types: [published] | ||
push: | ||
tags: '**' | ||
|
||
jobs: | ||
|
||
publish-release: | ||
runs-on: ubuntu-latest | ||
environment: publish | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: SCM Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Python & Poetry Environment | ||
uses: ./.github/actions/prepare_poetry_env | ||
|
||
- name: Build Artifacts | ||
run: poetry build | ||
|
||
- name: Build new Docker image | ||
run: "bash scripts/build/build_docker_runner_image.sh" | ||
|
||
- name: Docker login | ||
run: echo "$SECRET_DOCKER_TOKEN" | docker login --username "$SECRET_DOCKER_USER_NAME" --password-stdin | ||
env: # Set the secret as an input | ||
SECRET_DOCKER_USER_NAME: ${{ secrets.DOCKER_USER_NAME }} | ||
SECRET_DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }} | ||
|
||
- name: Push new Docker images | ||
run: bash scripts/build/push_docker_runner_image.sh latest "${{ github.event.release.tag_name }}" | ||
|
||
- name: PyPi Release | ||
env: | ||
POETRY_HTTP_BASIC_PYPI_USERNAME: "__token__" | ||
POETRY_HTTP_BASIC_PYPI_PASSWORD: "${{ secrets.PYPI_TOKEN }}" | ||
run: poetry publish | ||
|
||
- name: GitHub Release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: > | ||
gh release create ${GITHUB_REF_NAME} | ||
--title ${GITHUB_REF_NAME} -F "./doc/changes/changes_${GITHUB_REF_NAME}.md" | ||
dist/* |
86 changes: 0 additions & 86 deletions
86
.github/workflows/release_droid_upload_github_release_assets.yml
This file was deleted.
Oops, something went wrong.
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 @@ | ||
import subprocess | ||
import unittest | ||
|
||
|
||
class ConsoleScriptTest(unittest.TestCase): | ||
|
||
def test_console_script(self): | ||
return_code = subprocess.call("poetry install", shell=True) | ||
self.assertEqual(0, return_code, "Poetry install failed") | ||
return_code = subprocess.call("poetry run exaslct --help", shell=True) | ||
self.assertEqual(0, return_code) |