Merge pull request #11 from haya14busa/fix-10
Extract only semver part for latest release
This commit is contained in:
26
.github/workflows/depup.yml
vendored
26
.github/workflows/depup.yml
vendored
@@ -7,7 +7,7 @@ on:
|
||||
- '**'
|
||||
|
||||
jobs:
|
||||
depup:
|
||||
reviewdog:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
@@ -30,3 +30,27 @@ jobs:
|
||||
This PR is auto generated by [depup workflow](https://github.com/${{ github.repository }}/actions?query=workflow%3Adepup).
|
||||
branch: depup/reviewdog
|
||||
base: master
|
||||
|
||||
redpen:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: ./
|
||||
id: depup
|
||||
with:
|
||||
file: testdata/testfile
|
||||
version_name: REDPEN_VERSION
|
||||
repo: redpen-cc/redpen
|
||||
|
||||
- name: Create Pull Request
|
||||
uses: peter-evans/create-pull-request@v2
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
title: "chore(deps): update redpen to ${{ steps.depup.outputs.latest }}"
|
||||
commit-message: "chore(deps): update redpen to ${{ steps.depup.outputs.latest }}"
|
||||
body: |
|
||||
Update redpen to [${{ steps.depup.outputs.latest }}](https://github.com/redpen-cc/redpen/releases/tag/redpen-${{ steps.depup.outputs.latest }})
|
||||
|
||||
This PR is auto generated by [depup workflow](https://github.com/${{ github.repository }}/actions?query=workflow%3Adepup).
|
||||
branch: depup/redpen
|
||||
base: master
|
||||
|
||||
14
.github/workflows/test.yml
vendored
14
.github/workflows/test.yml
vendored
@@ -18,3 +18,17 @@ jobs:
|
||||
|
||||
- name: Check diff
|
||||
run: git diff
|
||||
|
||||
needless_prefix:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: ./
|
||||
id: depup
|
||||
with:
|
||||
file: testdata/testfile
|
||||
version_name: REDPEN_VERSION
|
||||
repo: redpen-cc/redpen
|
||||
|
||||
- name: Check diff
|
||||
run: git diff
|
||||
|
||||
@@ -30,8 +30,7 @@ list_releases() {
|
||||
LATEST_VERSION=$(\
|
||||
list_releases | \
|
||||
jq -r '.[] | .tag_name' | \
|
||||
sed 's/^v//' | \
|
||||
grep -P '\d+\.\d+\.\d+' | \
|
||||
grep -oP '\d+\.\d+\.\d+$' | \
|
||||
sort --version-sort --reverse | \
|
||||
head -n1
|
||||
)
|
||||
|
||||
4
testdata/testfile
vendored
4
testdata/testfile
vendored
@@ -10,3 +10,7 @@ yaml:
|
||||
|
||||
The above version should be updated to the latest version with this action.
|
||||
|
||||
|
||||
Other test cases.
|
||||
|
||||
REDPEN_VERSION=1.10.1
|
||||
|
||||
Reference in New Issue
Block a user