From 8121826b77102343220b2397f85ff64a8076647b Mon Sep 17 00:00:00 2001 From: ukorvl Date: Thu, 12 Oct 2023 20:44:44 +0400 Subject: [PATCH] minor changes #132 --- .github/workflows/release.yaml | 48 ++++-------------------------- .github/workflows/version.yaml | 53 ++++++++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+), 43 deletions(-) create mode 100644 .github/workflows/version.yaml diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 776974c1..d3493be0 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -1,59 +1,21 @@ -name: Version -# This workflow is triggered on push to master branch. -# It patches version in package.json and pushes changes to master branch. -# It also creates a new tag and pushes it to GitHub. -# It is used to make a new release. -# If you need to bump package minor or major version, you should do it manually. +name: Release +# This workflow nis used to make a new release on new tags in master branch. on: push: + tags: + - 'v*' branches: - - master - paths: - - "src/**" - - "package.json" - - "index.html" + - master jobs: - build: - uses: ./.github/workflows/build.yaml - secrets: inherit - with: - environment: test - commit: ${{ github.sha }} - fill_config: false - release: name: Release runs-on: ubuntu-latest permissions: contents: write - needs: [build] steps: - uses: actions/checkout@v3 - with: - fetch-depth: 0 - token: ${{ secrets.PUSH_THIS_REPO_TOKEN }} - - - name: Set git user - run: | - git config --global user.name 'github-actions[bot]' - git config --global user.email 'bot@nil.foundation' - - - uses: actions/setup-node@v3 - with: - node-version: 18 - - - name: Update version - run: npm version patch # creates new commit with tag automatically - - - name: Push changes - uses: ad-m/github-push-action@master - with: - github_token: ${{ secrets.PUSH_THIS_REPO_TOKEN }} - branch: master - tags: true - - uses: ncipollo/release-action@v1 with: generateReleaseNotes: true diff --git a/.github/workflows/version.yaml b/.github/workflows/version.yaml new file mode 100644 index 00000000..c1c482cd --- /dev/null +++ b/.github/workflows/version.yaml @@ -0,0 +1,53 @@ +name: Version +# This workflow is triggered on push to master branch. +# It patches version in package.json and pushes changes to master branch. +# It also creates a new tag and pushes it to GitHub. +# If you need to bump package minor or major version, you should do it manually. + +on: + push: + branches: + - master + paths: + - "src/**" + - "index.html" + +jobs: + build: + uses: ./.github/workflows/build.yaml + secrets: inherit + with: + environment: test + commit: ${{ github.sha }} + fill_config: false + + version: + name: Version + runs-on: ubuntu-latest + permissions: + contents: write + needs: [build] + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + token: ${{ secrets.PUSH_THIS_REPO_TOKEN }} + + - name: Set git user + run: | + git config --global user.name 'github-actions[bot]' + git config --global user.email 'bot@nil.foundation' + + - uses: actions/setup-node@v3 + with: + node-version: 18 + + - name: Update version + run: npm version patch # creates new commit with tag automatically + + - name: Push changes + uses: ad-m/github-push-action@master + with: + github_token: ${{ secrets.PUSH_THIS_REPO_TOKEN }} + branch: master + tags: true