-
Notifications
You must be signed in to change notification settings - Fork 234
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ENG-1235: Push release tags automatically on
rasa-sdk
(#1139)
* ENG-1235: Create and push release tags automatically * ENG-1235: Fixed tag-done message * ENG-1235: Added more info to module docstring, about release tagging * ENG-1235: Increased docstring info * ENG-1235: Updated readme/docs accordingly * ENG-1235: Address PR feedback, to not generate changelog on Dev versions either
- Loading branch information
1 parent
728c473
commit 1db19bc
Showing
4 changed files
with
164 additions
and
32 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,71 @@ | ||
name: Tag Release Version | ||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
- '[0-9]+.[0-9]+.x' | ||
types: [closed] | ||
|
||
env: | ||
COMMIT_EMAIL: [email protected] | ||
DEFAULT_PYTHON_VERSION: "3.10" | ||
|
||
jobs: | ||
if_merged_tag_release: | ||
name: Tag Release Version | ||
if: startsWith(github.head_ref, 'prepare-release-') && github.event.pull_request.merged == true | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout git repository 🕝 | ||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 | ||
with: | ||
token: ${{ secrets.RELEASE_TAGGER_PAT }} | ||
|
||
- name: Set up Python ${{ env.DEFAULT_PYTHON_VERSION }} 🐍 | ||
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0 | ||
with: | ||
python-version: ${{ env.DEFAULT_PYTHON_VERSION }} | ||
|
||
- name: Read Poetry Version 🔢 | ||
run: | | ||
echo "POETRY_VERSION=$(scripts/poetry-version.sh)" >> $GITHUB_ENV | ||
shell: bash | ||
|
||
- name: Install poetry 🦄 | ||
uses: Gr1N/setup-poetry@15821dc8a61bc630db542ae4baf6a7c19a994844 # v8 | ||
with: | ||
poetry-version: ${{ env.POETRY_VERSION }} | ||
|
||
- name: Load Poetry Cached Libraries ⬇ | ||
id: cache-poetry | ||
uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 #v4.0.0 | ||
with: | ||
path: .venv | ||
key: ${{ runner.os }}-poetry-${{ env.POETRY_VERSION }}-${{ env.DEFAULT_PYTHON_VERSION }}-${{ hashFiles('**/poetry.lock') }}-${{ secrets.POETRY_CACHE_VERSION }} | ||
restore-keys: ${{ runner.os }}-poetry-${{ env.DEFAULT_PYTHON_VERSION }} | ||
|
||
- name: Clear Poetry cache | ||
if: steps.cache-poetry.outputs.cache-hit == 'true' && contains(github.event.pull_request.labels.*.name, 'tools:clear-poetry-cache-unit-tests') | ||
run: rm -r .venv | ||
|
||
- name: Create virtual environment | ||
if: steps.cache-poetry.outputs.cache-hit != 'true' || contains(github.event.pull_request.labels.*.name, 'tools:clear-poetry-cache-unit-tests') | ||
run: python -m venv create .venv | ||
|
||
- name: Set up virtual environment | ||
run: poetry config virtualenvs.in-project true | ||
|
||
- name: Install Dependencies 📦 | ||
# Poetry intermittently fails to install dependency if it is not PEP 517 compliant | ||
# This is a workaround for that issue | ||
run: | | ||
sudo apt-get -y install libpq-dev | ||
make install-full | ||
- name: Configure git | ||
run: | | ||
git config --global user.email ${{ env.COMMIT_EMAIL }} | ||
git config --global user.name "Github Actions" | ||
- name: Tag Release | ||
run: make tag-release |
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