From 4318a6b41bfc11b076024e5448598da1833187b1 Mon Sep 17 00:00:00 2001 From: Yegor Bugayenko Date: Thu, 31 Oct 2024 07:43:30 +0300 Subject: [PATCH] up --- .github/workflows/eo-version-up.yml | 49 +++++++++++++++++++++++++++++ .github/workflows/up.yml | 15 +++++---- README.md | 2 +- 3 files changed, 57 insertions(+), 9 deletions(-) create mode 100644 .github/workflows/eo-version-up.yml diff --git a/.github/workflows/eo-version-up.yml b/.github/workflows/eo-version-up.yml new file mode 100644 index 0000000..a28705d --- /dev/null +++ b/.github/workflows/eo-version-up.yml @@ -0,0 +1,49 @@ +# The MIT License (MIT) +# +# Copyright (c) 2022-2024 Objectionary.com +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +--- +name: eo-version-up +'on': + push: + branches: + - master + tags: + - '*' +concurrency: + group: up-${{ github.ref }} + cancel-in-progress: true +jobs: + eo-version-up: + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@v4 + - run: sudo apt-get -y install jq + - run: | + curl https://api.github.com/repos/objectionary/eo/releases/latest \ + --silent | jq -r .tag_name > eo-version.txt + - uses: peter-evans/create-pull-request@v7 + with: + branch: version-up + commit-message: 'new version of eo maven plugin' + delete-branch: true + title: 'New version of EO Maven Plugin' + assignees: yegor256 + base: master diff --git a/.github/workflows/up.yml b/.github/workflows/up.yml index 52ddeee..526cfed 100644 --- a/.github/workflows/up.yml +++ b/.github/workflows/up.yml @@ -1,6 +1,6 @@ # The MIT License (MIT) # -# Copyright (c) 2022-2024 Objectionary.com +# Copyright (c) 2024 Objectionary.com # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal @@ -35,15 +35,14 @@ jobs: runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 - - run: sudo apt-get -y install jq - - run: | - curl https://api.github.com/repos/objectionary/eo/releases/latest \ - --silent | jq -r .tag_name > eo-version.txt + - run: |- + git fetch --tags --force && \ + latest=$(git tag --sort=creatordate | tail -1) && \ + sed -E -i "s/@[0-9.]+/@${latest}/g" README.md - uses: peter-evans/create-pull-request@v7 with: branch: version-up - commit-message: 'new version of eo maven plugin' + commit-message: 'new version in README' delete-branch: true - title: 'New version of EO Maven Plugin' - assignees: yegor256 + title: 'New version in README' base: master diff --git a/README.md b/README.md index 6ace9fe..d4e5a60 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ First, you install [npm][npm-install] and [Java SE][java-se]. Then, you install [eolang][npm] package: ```bash -npm install -g eolang +npm install -g eolang@0.0.0 ``` Then, you write a simple [EO](https://www.eolang.org) program in `hello.eo` file