Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 13 additions & 6 deletions .github/workflows/go-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,12 @@ jobs:

- name: Get release directory name
id: release-dir
env:
PROJECT_NAME: ${{ github.event.inputs.project-name }}
VERSION: ${{ github.event.inputs.version }}
run: |
chmod +x mpl/scripts/go-release-automation.sh
RELEASE_DIR_NAME=$(mpl/scripts/go-release-automation.sh get_release_dir_name "${{ github.event.inputs.project-name }}" "${{ github.event.inputs.version }}")
RELEASE_DIR_NAME=$(mpl/scripts/go-release-automation.sh get_release_dir_name "$PROJECT_NAME" "$VERSION")
echo "releaseDirName=$RELEASE_DIR_NAME" >> $GITHUB_OUTPUT

- name: Generate a changelog
Expand All @@ -76,13 +79,17 @@ jobs:
args: --bump -u --prepend releases/go/${{ steps.release-dir.outputs.releaseDirName }}/CHANGELOG.md

- name: Run Go release automation script
env:
PROJECT_NAME: ${{ github.event.inputs.project-name }}
VERSION: ${{ github.event.inputs.version }}
run: |
chmod +x mpl/scripts/go-release-automation.sh
mpl/scripts/go-release-automation.sh run_release_script ${{ github.event.inputs.project-name }} ${{ github.event.inputs.version }}
mpl/scripts/go-release-automation.sh run_release_script "$PROJECT_NAME" "$VERSION"

- name: print diff between development and release directory
env:
RELEASE_DIR_NAME: ${{ steps.release-dir.outputs.releaseDirName }}
PROJECT_NAME: ${{ github.event.inputs.project-name }}
run: |
RELEASE_DIR_NAME="${{ steps.release-dir.outputs.releaseDirName }}"
PROJECT_NAME="${{ github.event.inputs.project-name }}"
DIFF_FILES=$(diff -qr $PROJECT_NAME/runtimes/go/ImplementationFromDafny-go releases/go/$RELEASE_DIR_NAME || true)
echo $DIFF_FILES
DIFF_FILES=$(diff -qr "$PROJECT_NAME/runtimes/go/ImplementationFromDafny-go" "releases/go/$RELEASE_DIR_NAME" || true)
echo "$DIFF_FILES"
9 changes: 6 additions & 3 deletions .github/workflows/smithy-diff.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,12 @@ jobs:
PR_NUMBER: ${{ github.event.pull_request.number }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
FILES: ${{ steps.file-changes.outputs.FILES }}
PR_USER: ${{ github.event.pull_request.user.login }}
ACTOR: ${{ github.actor }}
REPO: ${{ github.repository }}
if: ${{env.FILES != ''}}
run: |
# TODO: If https://github.com/smithy-lang/smithy-dafny/issues/491 is resolved, remove comment about this issue.
COMMENT="@${{github.event.pull_request.user.login}} and @${{github.actor}}, I noticed you are updating the smithy model files.\nDoes this update need new or updated javadoc trait documentation?\n Are you adding constraints inside list, map or union? Do you know about this issue: https://github.com/smithy-lang/smithy-dafny/issues/491?"
COMMENT_URL="https://api.github.com/repos/${{ github.repository }}/issues/${PR_NUMBER}/comments"
curl -s -H "Authorization: token ${GITHUB_TOKEN}" -X POST $COMMENT_URL -d "{\"body\":\"$COMMENT\"}"
COMMENT="@${PR_USER} and @${ACTOR}, I noticed you are updating the smithy model files.\nDoes this update need new or updated javadoc trait documentation?\n Are you adding constraints inside list, map or union? Do you know about this issue: https://github.com/smithy-lang/smithy-dafny/issues/491?"
COMMENT_URL="https://api.github.com/repos/${REPO}/issues/${PR_NUMBER}/comments"
curl -s -H "Authorization: token ${GITHUB_TOKEN}" -X POST "$COMMENT_URL" -d "{\"body\":\"$COMMENT\"}"
Loading