Add a tool to create and render stageable changelog entries #4812
Workflow file for this run
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: ci | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
# WARNING: If you add a new job, make sure to add it to the "need" list for the | |
# amend job to make sure it always runs last. This is to make sure that it | |
# doesn't end up hiding the workflow run. | |
build: | |
runs-on: ${{ matrix.os }} | |
name: Java ${{ matrix.java }} ${{ matrix.os }} | |
strategy: | |
matrix: | |
java: [8, 11, 17, 21] | |
os: [macos-latest, ubuntu-latest, windows-latest] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: gradle/wrapper-validation-action@v3 | |
- name: Set up JDK ${{ matrix.java }} | |
uses: actions/setup-java@v4 | |
with: | |
java-version: ${{ matrix.java }} | |
distribution: 'corretto' | |
- name: Clean, build and javadoc | |
run: ./gradlew clean build javadoc -Plog-tests --stacktrace | |
- name: Allow long file names in git for windows | |
if: matrix.os == 'windows-latest' | |
run: git config --system core.longpaths true | |
- name: CLI integration tests | |
if: matrix.java == 17 | |
run: ./gradlew :smithy-cli:integ -Plog-tests --stacktrace | |
- uses: actions/upload-artifact@v4 | |
if: failure() | |
with: | |
name: java-${{ matrix.java }}-${{ matrix.os }}-test-report | |
path: '**/build/reports/tests' | |
build-docs: | |
runs-on: ubuntu-latest | |
name: Documentation Build | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python 3.x | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.x' | |
- name: Install doc dependencies | |
run: cd docs && make install | |
- name: Build docs | |
run: cd docs && make html | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: built-docs | |
path: docs/build/html | |
amend: | |
name: "Add PR links to staged changelogs" | |
runs-on: ubuntu-latest | |
needs: | |
- build | |
- build-docs | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.head_ref }} | |
repository: ${{ github.event.pull_request.head.repo.full_name }} | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.13" | |
- name: "Amend and push any staged changelogs" | |
run: | | |
git config user.name "github-actions[bot]" | |
git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
git fetch origin ${{ github.base_ref }} | |
./.changes/amend --push |