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: Server Release on Version Change | |
on: | |
push: | |
paths: | |
- 'VERSION' | |
branches: | |
- main | |
jobs: | |
release-server: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Get server version number | |
id: get_server_version | |
run: | | |
SERVER_VERSION=$(cat VERSION) | |
echo "SERVER_VERSION=$SERVER_VERSION" > $GITHUB_ENV | |
- name: Create Git tag for server | |
run: | | |
git config --global user.name "github-actions[bot]" | |
git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
git tag "astra-assistants-api-server-${{ env.SERVER_VERSION }}" | |
git push origin "astra-assistants-api-server-${{ env.SERVER_VERSION }}" | |
- name: Create GitHub Release for server | |
uses: actions/create-release@v1 | |
with: | |
tag_name: "server-${{ env.SERVER_VERSION }}" | |
release_name: "${{ env.SERVER_VERSION }} server" | |
body: "Automated release for astra-assistants server ${{ env.SERVER_VERSION }}" | |
draft: false | |
prerelease: false | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |