forked from owltail-cognition/pyPodcastParser
-
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.
- Loading branch information
Poonam Shinde
authored and
Poonam Shinde
committed
Dec 5, 2024
1 parent
84a0270
commit 4eec895
Showing
1 changed file
with
45 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: publish-release-version | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
id-token: write | ||
strategy: | ||
matrix: | ||
python-version: ["3.9"] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v1 | ||
- name: Configure AWS credentials | ||
uses: aws-actions/configure-aws-credentials@v4 | ||
with: | ||
role-to-assume: arn:aws:iam::219619990026:role/content-github-actions-role | ||
aws-region: us-east-1 | ||
role-duration-seconds: 1200 | ||
|
||
- name: Setting up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.9 | ||
- name: Installing Dependencies | ||
run: | | ||
pip install pip --upgrade | ||
pip install virtualenv | ||
- name: Deploy to CodeArtifact | ||
run: | | ||
export TWINE_USERNAME=aws | ||
export TWINE_PASSWORD=$(aws codeartifact get-authorization-token --domain content-platform --domain-owner 219619990026 --region us-east-1 --query authorizationToken --output text) | ||
export TWINE_REPOSITORY_URL=$(aws codeartifact get-repository-endpoint --domain content-platform --domain-owner 219619990026 --repository content-platform --region us-east-1 --format pypi --query repositoryEndpoint --output text) | ||
export BRANCH_NAME=$(echo $GITHUB_REF | sed 's/refs\/heads\///') | ||
CURRENT_VERSION=$(git describe --abbrev=0 --tags) | ||
echo "Current released version is: $CURRENT_VERSION" | ||
pip install -r requirements-ci.txt | ||
VERSION=$CURRENT_VERSION python setup.py sdist bdist_wheel | ||
twine upload --verbose --repository pypodcastparser-ihr dist/* |