Skip to content

Commit

Permalink
Merge pull request #1054 from guzman-raphael/docs
Browse files Browse the repository at this point in the history
GHA: Add release body validation step
  • Loading branch information
guzman-raphael authored Sep 21, 2022
2 parents 50f74dd + deca3a1 commit e7dc65a
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/development.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:
pull_request:
branches:
- '**' # every branch
- '!gh-pages' # exclude gh-pages branch
- '!stage*' # exclude branches beginning with stage
jobs:
build:
Expand All @@ -28,9 +29,18 @@ jobs:
COMPOSE_HTTP_TIMEOUT: "120"
steps:
- uses: actions/checkout@v2
- name: Validate version and release notes
run: |
DJ_VERSION=$(grep -oP '\d+\.\d+\.\d+' datajoint/version.py)
RELEASE_BODY=$(python -c \
'print(open("./CHANGELOG.md").read().split("\n\n")[1].split("\n", 1)[1])' \
)
echo "DJ_VERSION=${DJ_VERSION}" >> $GITHUB_ENV
echo "RELEASE_BODY<<EOF" >> $GITHUB_ENV
echo "$RELEASE_BODY" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
- name: Build pip artifacts
run: |
export DJ_VERSION=$(grep -oP '\d+\.\d+\.\d+' datajoint/version.py)
export HOST_UID=$(id -u)
docker-compose -f docker-compose-build.yaml up --exit-code-from app --build
echo "DJ_VERSION=${DJ_VERSION}" >> $GITHUB_ENV
Expand Down Expand Up @@ -135,7 +145,9 @@ jobs:
'print(open("./CHANGELOG.md").read().split("\n\n")[1].split("\n", 1)[1])' \
)
echo "DJ_VERSION=${DJ_VERSION}" >> $GITHUB_ENV
echo "RELEASE_BODY='${RELEASE_BODY}'" >> $GITHUB_ENV
echo "RELEASE_BODY<<EOF" >> $GITHUB_ENV
echo "$RELEASE_BODY" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
- name: Create GH release
id: create_gh_release
uses: actions/create-release@v1
Expand Down

0 comments on commit e7dc65a

Please sign in to comment.