Beta to stable - 5.0 #204
This file contains hidden or 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 | |
| - "v*.*.*" | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| if: github.event.pull_request.merged | |
| env: | |
| DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | |
| DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| submodules: true | |
| - name: Set up Python 3.13 | |
| uses: actions/setup-python@v1 | |
| with: | |
| python-version: 3.13 | |
| - name: Build and publish container | |
| run: | | |
| export BRANCH=${GITHUB_REF##*/} | |
| export VERSION=$(grep '^version = ' pyproject.toml | cut -d'"' -f2) | |
| 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 | |
| ( test $BRANCH = "stable" && export PRERELEASE=false ) || export PRERELEASE=true | |
| echo "PRERELEASE=$PRERELEASE" >> $GITHUB_ENV | |
| echo "RELEASE=$RELEASE" >> $GITHUB_ENV | |
| export CONTAINER_NAME="bounty-agent" | |
| bash ./helper-scripts/build_and_publish.sh | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: ${{ env.VERSION }} | |
| name: ${{ env.VERSION }} | |
| draft: false | |
| prerelease: ${{ github.base_ref != 'stable' }} | |
| generate_release_notes: true |