ci: use release-please to bump versions in docs (#1429)

This commit is contained in:
James Hegedus 2023-01-20 16:51:18 +11:00 committed by GitHub
parent 9a8bb47758
commit fd486dc2ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 20 additions and 58 deletions

View File

@ -1,23 +0,0 @@
name: On Release
on:
push:
tags:
- '*'
jobs:
bump-versions-in-docs:
runs-on: ubuntu-latest
steps:
- name: checkout repo
uses: actions/checkout@v3
with:
ref: "refs/heads/master"
- name: replace version in getting-started docs
run: scripts/update_version_in_docs.bash
- name: replace version in security policy support list
run: scripts/update_version_list_in_security_policy.bash
- name: commit docs version update
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "docs: update version in install instructions & security policy"

View File

@ -14,3 +14,6 @@ jobs:
with: with:
release-type: simple release-type: simple
bump-minor-pre-major: true # remove this to enable breaking changes causing 1.0.0 tag bump-minor-pre-major: true # remove this to enable breaking changes causing 1.0.0 tag
extra-files: |
docs/guide/getting-started.md
SECURITY.md

View File

@ -6,23 +6,19 @@ not covered under this security policy.**
## Supported Versions ## Supported Versions
Typically only the latest version is maintained. Versions are released <!-- x-release-please-start-version -->
sequentially, with major, minor, and patch versions incremented as necessary. If
a vulnerability is found in an old version of asdf, updating to the latest
version of asdf will be required.
| Version | Supported | ```
| ------- | ------------------ | 0.11.1
| 0.10.x | :white_check_mark: | ```
| 0.9.x | :x: |
| 0.8.x | :x: | <!-- x-release-please-end -->
| 0.7.x | :x: |
| 0.6.x | :x: | Typically only the latest version is maintained. Versions are released
| 0.5.x | :x: | sequentially, with major, minor, and patch versions incremented as necessary.
| 0.4.x | :x: |
| 0.3.x | :x: | If a vulnerability is found in an old version of asdf, updating to the latest
| 0.2.x | :x: | version of asdf will be required.
| 0.1.x | :x: |
## Reporting a Vulnerability ## Reporting a Vulnerability

View File

@ -32,10 +32,14 @@ asdf primarily requires `git` & `curl`. Here is a _non-exhaustive_ list of comma
### Official Download ### Official Download
<!-- x-release-please-start-version -->
```shell:no-line-numbers ```shell:no-line-numbers
git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.10.2 git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.11.1
``` ```
<!-- x-release-please-end -->
### Community Supported Download Methods ### Community Supported Download Methods
We highly recommend using the official `git` method. We highly recommend using the official `git` method.

View File

@ -1,6 +0,0 @@
#!/usr/bin/env bash
set -euo pipefail
version=$(cat version.txt)
sed -i "s/\(git clone.*--branch \).*/\1v$version/" docs/guide/getting-started.md

View File

@ -1,12 +0,0 @@
#!/usr/bin/env bash
set -euo pipefail
version_major_minor_x="$(cut -f1-2 -d "." version.txt).x"
# skip if version is already in the list
if ! grep -q "$version_major_minor_x" SECURITY.md; then
# prepend new version to the list
sed -i "s/white_check_mark:/x: /g" SECURITY.md
sed -i "s/^\(| -* | -* |\)$/\1\n| $version_major_minor_x | :white_check_mark: |/" SECURITY.md
fi