8 Commits
v0.1 ... v0.3

Author SHA1 Message Date
ce6a4ea382 fix(depup): fix parsing of single point releases 2024-07-02 08:24:01 +02:00
0a00b95a1d feat(dedup): remove preleaseses 2024-06-24 19:32:58 +02:00
1b0d4e0e75 .github/renovate.json gelöscht 2024-06-24 19:09:31 +02:00
6b661fea92 .github/workflows/test.yml gelöscht 2024-06-24 19:09:26 +02:00
0ff1bb0945 .github/workflows/reviewdog.yml gelöscht
Some checks failed
Test / test (push) Has been cancelled
Test / needless_prefix (push) Has been cancelled
Test / not_semver (push) Has been cancelled
Test / quoted_version (push) Has been cancelled
Test / tagged_version (push) Has been cancelled
2024-06-24 19:09:22 +02:00
c0a49cc98b .github/workflows/release.yml gelöscht
Some checks failed
Test / test (push) Waiting to run
Test / needless_prefix (push) Waiting to run
Test / not_semver (push) Waiting to run
Test / quoted_version (push) Waiting to run
Test / tagged_version (push) Waiting to run
reviewdog / runner / shellcheck (push) Has been cancelled
reviewdog / runner / hadolint (push) Has been cancelled
2024-06-24 19:09:19 +02:00
8e6cdab5dc .github/workflows/dockerimage.yml gelöscht
Some checks failed
reviewdog / runner / shellcheck (push) Waiting to run
reviewdog / runner / hadolint (push) Waiting to run
Test / test (push) Waiting to run
Test / needless_prefix (push) Waiting to run
Test / not_semver (push) Waiting to run
Test / quoted_version (push) Waiting to run
Test / tagged_version (push) Waiting to run
release / release (push) Has been cancelled
release / release-check (push) Has been cancelled
2024-06-24 19:09:16 +02:00
306cafc4e9 .github/workflows/depup.yml gelöscht
Some checks failed
release / release (push) Waiting to run
release / release-check (push) Waiting to run
reviewdog / runner / shellcheck (push) Waiting to run
reviewdog / runner / hadolint (push) Waiting to run
Test / quoted_version (push) Waiting to run
Test / test (push) Waiting to run
Test / needless_prefix (push) Waiting to run
Test / not_semver (push) Waiting to run
Test / tagged_version (push) Waiting to run
Docker Image CI / build (push) Has been cancelled
2024-06-24 19:09:12 +02:00
7 changed files with 3 additions and 242 deletions

View File

@@ -1,8 +0,0 @@
{
"extends": [
"config:base"
],
"labels": [
"bump:patch"
]
}

View File

@@ -1,45 +0,0 @@
name: depup
on:
schedule:
- cron: '14 14 * * *'
workflow_dispatch:
push: # for testing
branches:
- '**'
jobs:
reviewdog:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./with-pr
with:
file: testdata/testfile
version_name: REVIEWDOG_VERSION
repo: reviewdog/reviewdog
labels: demo
redpen:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./with-pr
with:
file: testdata/testfile
version_name: REDPEN_VERSION
repo: redpen-cc/redpen
tag_prefix: redpen-
labels: demo
themis:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./with-pr
id: depup
with:
file: testdata/testfile
version_name: THEMIS_VERSION
repo: thinca/vim-themis
tag: true
labels: demo

View File

@@ -1,13 +0,0 @@
name: Docker Image CI
on:
push:
branches:
- master
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build the Docker image
run: docker build . --file Dockerfile --tag ${{ github.repository }}:$(date +%s)

View File

@@ -1,55 +0,0 @@
name: release
on:
push:
branches:
- master
tags:
- 'v*.*.*'
pull_request:
types:
- labeled
jobs:
release:
if: github.event.action != 'labeled'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Bump version on merging Pull Requests with specific labels.
# (bump:major,bump:minor,bump:patch)
- id: bumpr
if: "!startsWith(github.ref, 'refs/tags/')"
uses: haya14busa/action-bumpr@v1
# Update corresponding major and minor tag.
# e.g. Update v1 and v1.2 when releasing v1.2.3
- uses: haya14busa/action-update-semver@v1
if: "!steps.bumpr.outputs.skip"
with:
tag: ${{ steps.bumpr.outputs.next_version }}
# Get tag name.
- id: tag
uses: haya14busa/action-cond@v1
with:
cond: "${{ startsWith(github.ref, 'refs/tags/') }}"
if_true: ${{ github.ref }}
if_false: ${{ steps.bumpr.outputs.next_version }}
# Create release
- if: "steps.tag.outputs.value != ''"
env:
TAG_NAME: ${{ steps.tag.outputs.value }}
CURRENT: ${{ steps.bumpr.outputs.current_version }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release create "${TAG_NAME}" -t "Release ${TAG_NAME/refs\/tags\//}" --generate-notes --notes-start-tag "${CURRENT}"
release-check:
if: github.event.action == 'labeled'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Post bumpr status comment
uses: haya14busa/action-bumpr@v1

View File

@@ -1,40 +0,0 @@
name: reviewdog
on:
push:
branches:
- master
pull_request:
jobs:
shellcheck:
name: runner / shellcheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: haya14busa/action-cond@v1
id: reporter
with:
cond: ${{ github.event_name == 'pull_request' }}
if_true: "github-pr-review"
if_false: "github-check"
- uses: reviewdog/action-shellcheck@v1
with:
github_token: ${{ secrets.github_token }}
reporter: ${{ steps.reporter.outputs.value }}
level: warning
hadolint:
name: runner / hadolint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: haya14busa/action-cond@v1
id: reporter
with:
cond: ${{ github.event_name == 'pull_request' }}
if_true: "github-pr-review"
if_false: "github-check"
- uses: reviewdog/action-hadolint@v1
with:
github_token: ${{ secrets.github_token }}
reporter: ${{ steps.reporter.outputs.value }}
level: warning

View File

@@ -1,78 +0,0 @@
name: Test
on:
push:
branches:
- master
pull_request:
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./
id: depup
with:
file: testdata/testfile
version_name: REVIEWDOG_VERSION
repo: reviewdog/reviewdog
- name: Check diff
run: git diff
needless_prefix:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./
id: depup
with:
file: testdata/testfile
version_name: REDPEN_VERSION
repo: redpen-cc/redpen
- name: Check diff
run: git diff
not_semver:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./
id: depup
with:
file: testdata/testfile
version_name: TMUX_VERSION
repo: tmux/tmux
- name: Check diff
run: git diff
quoted_version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./
id: depup
with:
file: testdata/testfile
version_name: POETRY_VERSION
repo: python-poetry/poetry
- name: Check diff
run: git diff
tagged_version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./
id: depup
with:
file: testdata/testfile
version_name: THEMIS_VERSION
repo: thinca/vim-themis
tag: true
- name: Check diff
run: git diff

View File

@@ -11,7 +11,7 @@ VERSION_NAME="${INPUT_VERSION_NAME:-REVIEWDOG_VERSION}"
# Get current version. # Get current version.
# NOTE: Go to https://regex101.com/r/t1JcmL/13 To see the current regex in action. # NOTE: Go to https://regex101.com/r/t1JcmL/13 To see the current regex in action.
CURRENT_VERSION=$(grep -oP "${VERSION_NAME}(?:\s*=\s*|:?\s*)[\"|\']?v?\K\d+\.\d+(\.\d+)(\.\d+)?(-[^\'\"\s]*)?" "${FILE}" | head -n1) CURRENT_VERSION=$(grep -oP "${VERSION_NAME}(?:\s*=\s*|:?\s*)[\"|\']?v?\K\d+\.\d+(\.\d+)?(\.\d+)?(-[^\'\"\s]*)?" "${FILE}" | head -n1)
if [ -z "${CURRENT_VERSION}" ]; then if [ -z "${CURRENT_VERSION}" ]; then
echo "cannot parse ${VERSION_NAME}" echo "cannot parse ${VERSION_NAME}"
exit 1 exit 1
@@ -33,7 +33,7 @@ list_versions() {
if [ "${INPUT_TAG:-false}" = "true" ]; then if [ "${INPUT_TAG:-false}" = "true" ]; then
git ls-remote -q --tags "https://github.com/${REPO}.git" | awk '{ print $2 }' git ls-remote -q --tags "https://github.com/${REPO}.git" | awk '{ print $2 }'
else else
list_releases | jq -r '.[] | .tag_name' list_releases | jq -r '.[] | select(.prerelease|not) | .tag_name'
fi fi
} }
@@ -71,6 +71,6 @@ if [ "${CURRENT_VERSION}" = "${LATEST_VERSION}" ]; then
fi fi
echo "Updating ${VERSION_NAME} to ${LATEST_VERSION} in ${FILE}" echo "Updating ${VERSION_NAME} to ${LATEST_VERSION} in ${FILE}"
perl -i -pe "s/${VERSION_NAME}(?:\s*=\s*|:?\s*)[\"|\']?v?\K\d+\.\d+(\.\d+)(\.\d+)?(-[^\'\"\s]*)?/${LATEST_VERSION}/g" "${FILE}" perl -i -pe "s/${VERSION_NAME}(?:\s*=\s*|:?\s*)[\"|\']?v?\K\d+\.\d+(\.\d+)?(\.\d+)?(-[^\'\"\s]*)?/${LATEST_VERSION}/g" "${FILE}"
echo "Updated. Commit and create Pull-Request as you need." echo "Updated. Commit and create Pull-Request as you need."