diff --git a/.github/changes-template.md b/.github/changes-template.md new file mode 100644 index 00000000..86642624 --- /dev/null +++ b/.github/changes-template.md @@ -0,0 +1,13 @@ +## Development Version + +These endpoints have been added or updated since the last release. + +There are likely to be descriptions etc outside of the list below, but new query parameters, changes to headers, new endpoints should be listed. + +| Endpoint | [Lighthouse](https://github.com/sigp/lighthouse) | [Lodestar](https://github.com/ChainSafe/lodestar) | [Nimbus](https://github.com/status-im/nimbus-eth2) | [Prysm](https://github.com/prysmaticlabs/prysm) | [Teku](https://github.com/ConsenSys/teku) | +|---------------------------------------------------------------------------------------------------------------------|--------------------------------------------------|---------------------------------------------------|----------------------------------------------------|-------------------------------------------------|-------------------------------------------| + +The Following are no longer in the Standard API, removed since the latest version. + +| Endpoint | [Lighthouse](https://github.com/sigp/lighthouse) | [Lodestar](https://github.com/ChainSafe/lodestar) | [Nimbus](https://github.com/status-im/nimbus-eth2) | [Prysm](https://github.com/prysmaticlabs/prysm) | [Teku](https://github.com/ConsenSys/teku) | +|----------------------------------------------------------------------------------------------------------|--------------------------------------------------|---------------------------------------------------|----------------------------------------------------|-------------------------------------------------|-------------------------------------------| diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index d63a9569..918308e3 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -12,10 +12,36 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 - run: npm i -g @apidevtools/swagger-cli@4 + - name: Update Spec version + run: "sed -i 's/version: \"Dev/version: \"${{ github.ref_name }}/' ./beacon-node-oapi.yaml" - name: Bundle yaml spec run: "swagger-cli bundle ./beacon-node-oapi.yaml -r -t yaml -o ./deploy/beacon-node-oapi.yaml" - name: Bundle json spec run: "swagger-cli bundle ./beacon-node-oapi.yaml -r -t json -o ./deploy/beacon-node-oapi.json" + - name: Update index.html + run: | + sed -i "/urls:/a \ {url: \"./releases/${{ github.ref_name }}/beacon-node-oapi.json\", name: \"${{ github.ref_name }}\"}," ./index.html + - name: Update Changelog + run: | + sed -i "s/## Development Version/## ${{ github.ref_name }}/" ./CHANGES.md + awk '/# Recent Changes/ {print; print ""; system("cat development_version_template.md"); next}1' CHANGES.md > temp && mv temp CHANGES.md + - name: Commit and push changes + run: | + git config --global user.name "github-actions[bot]" + git config --global user.email "github-actions[bot]@users.noreply.github.com" + git checkout -b release-${{ github.ref_name }} + git add index.html CHANGES.md + git commit -m "Release ${{ github.ref_name }}" + git push origin release-${{ github.ref_name }} + - name: Create Pull Request + uses: peter-evans/create-pull-request@v6 + with: + token: ${{ secrets.GITHUB_TOKEN }} + commit-message: "Release ${{ github.ref_name }}" + branch: release-${{ github.ref_name }} + title: "Release ${{ github.ref_name }}" + body: "" + base: master - name: Create Release id: create_release uses: softprops/action-gh-release@v2 diff --git a/CHANGES.md b/CHANGES.md index b54ebc18..8fd3841a 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,6 +1,5 @@ # Recent Changes - ## Development Version These endpoints have been added or updated since the last release. diff --git a/README.md b/README.md index df41a324..c52462c6 100644 --- a/README.md +++ b/README.md @@ -68,16 +68,4 @@ redocly lint beacon-node-oapi.yaml ## Releasing -1. Create and push tag - - - Make sure `info.version` in `beacon-node-oapi.yaml` file is updated before tagging. This will need to be a PR, and will get the release process started. - - CD will create github release and upload bundled spec file - -2. Create a second PR, containing the updated `index.html`. Also change back the `info.version` in `beacon-node-api.yaml` back to `Dev` - - - The `index.html` file needs a new release entrypoint added to refer to the new release. Find the `urls` field, - and add the new release as the first entry in the list. - Entry should be in following format(replace `` with real tag name from step 1.): -``` - {url: "./releases//beacon-node-oapi.json", name: ""}, -``` +Create and push a tag. CD will create github release, upload bundled spec file and update other files like `index.html` and `CHANGES.md`.