diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ce54f976..a77191d6 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -99,10 +99,32 @@ jobs: name: openapi-artifact path: openapi.tar.gz + generate-changelog: + name: "📢 Run towncrier for changelog" + # skip for builds of git tags + if: "!startsWith(github.ref, 'refs/tags/')" + runs-on: ubuntu-latest + steps: + - name: "📥 Source checkout" + uses: actions/checkout@v2 + - name: "➕ Setup Python" + uses: actions/setup-python@v4 + - name: "➕ Install towncrier" + run: "pip install 'towncrier'" + - name: "Generate changelog" + run: ./scripts/generate-changelog.sh vUNSTABLE + - name: "📤 Artifact upload" + uses: actions/upload-artifact@v2 + with: + name: changelog-artifact + path: content/changelog/vUNSTABLE.md + build-spec: name: "📖 Build the spec" runs-on: ubuntu-latest - needs: [calculate-baseurl, build-openapi] + needs: [calculate-baseurl, build-openapi, generate-changelog] + # run even if generate-changelog was skipped + if: ${{ always() }} steps: - name: "➕ Setup Node" uses: actions/setup-node@v2 @@ -119,9 +141,14 @@ jobs: run: | npm i npm run get-proposals + - name: "📥 Download generated changelog" + if: "needs.generate-changelog.result == 'success'" + uses: actions/download-artifact@v3 + with: + name: changelog-artifact + path: content/changelog - name: "⚙️ hugo" run: hugo --baseURL "${{ needs.calculate-baseurl.outputs.baseURL }}" -d "spec" - # We manually unpack the spec OpenAPI definition JSON to the website tree # to make it available to the world in a canonical place: # https://spec.matrix.org/latest/client-server-api/api.json diff --git a/changelogs/internal/newsfragments/1340.clarification b/changelogs/internal/newsfragments/1340.clarification new file mode 100644 index 00000000..a3180440 --- /dev/null +++ b/changelogs/internal/newsfragments/1340.clarification @@ -0,0 +1 @@ +Generate the unstable changelogs with towncrier, for consistency. diff --git a/content/changelog.md b/content/changelog/index.md similarity index 85% rename from content/changelog.md rename to content/changelog/index.md index a84514b6..560cb43b 100644 --- a/content/changelog.md +++ b/content/changelog/index.md @@ -6,13 +6,7 @@ weight: 1000 {{% changelog/changelog-description %}} -{{% changelog/changelog-changes %}} - - -{{% changelog/changelog-rendered p="changelogs/v1.4.md" %}} -{{% changelog/changelog-rendered p="changelogs/v1.3.md" %}} -{{% changelog/changelog-rendered p="changelogs/v1.2.md" %}} -{{% changelog/changelog-rendered p="changelogs/v1.1.md" %}} +{{% changelog/changelogs %}}