2.3.0 beta #109
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
name: Build and publish | |
on: | |
pull_request: | |
types: [closed] | |
branches: | |
- master | |
- develop | |
- beta | |
- stable | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 | |
strategy: | |
matrix: | |
python-version: [3.11] | |
if: github.event.pull_request.merged | |
env: | |
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | |
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: true | |
- name: Set up Python 3.11 | |
uses: actions/setup-python@v1 | |
with: | |
python-version: 3.11 | |
# - name: Checkout submodules | |
# uses: textbook/git-checkout-submodule-action@master | |
# with: | |
# remote: true | |
- name: Build and publish container | |
run: | | |
export BRANCH=${GITHUB_REF##*/} | |
export VERSION=$(cat VERSION) | |
echo "Branch: $BRANCH" | |
echo "Base version: $VERSION" | |
export VERSION=$(bash ./helper-scripts/calculate_version.sh) | |
echo "VERSION=$VERSION" >> $GITHUB_ENV | |
echo "Version $VERSION" | |
export RELEASE=true | |
echo "RELEASE=$RELEASE" >> $GITHUB_ENV | |
export CONTAINER_NAME="transaction-manager" | |
bash ./helper-scripts/build_and_publish.sh | |
- name: Checkout code | |
uses: actions/checkout@master | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ env.VERSION }} | |
release_name: ${{ env.VERSION }} | |
draft: false | |
prerelease: true |