Post Release #2
Workflow file for this run
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: Post Release | |
| on: | |
| # Once draft release is released, trigger the docs release | |
| release: | |
| types: | |
| ## pre-release and stable release | |
| #- published | |
| ## stable release only | |
| - released | |
| jobs: | |
| call-publish-docs: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: ./.github/workflows/docs.yaml | |
| update-version: | |
| permissions: | |
| # write permission is required to update version.py | |
| contents: write | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Update version.py | |
| id: update_version | |
| run: | | |
| VERSION=$(echo "${{ github.event.release.name }}" | grep -oP '\d+\.\d+\.\d+') | |
| echo "VERSION=$VERSION" >> $GITHUB_ENV | |
| sed -i "s/^__version__ = .*/__version__ = \"$VERSION\"/" datajoint/version.py | |
| # Commit the changes | |
| git config --global user.name "github-actions" | |
| git config --global user.email "[email protected]" | |
| git add datajoint/version.py | |
| git commit -m "Update version.py to $VERSION" | |
| git push | |
| slack-notification: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Post text to a Slack channel | |
| uses: slackapi/[email protected] | |
| with: | |
| method: chat.postMessage | |
| token: ${{ secrets.SLACK_BOT_TOKEN }} | |
| payload: | | |
| channel: ${{ secrets.SLACK_CHANNEL_ID }} | |
| text: "howdy <@channel>!" |