From 93f7478a91f4722fbaa267fa7628dcade8801a42 Mon Sep 17 00:00:00 2001 From: Aaron Czichon Date: Thu, 21 Nov 2024 16:04:56 -0700 Subject: [PATCH] ci: updated release workflow to automatically increment versions on main branch refs: #20 --- .github/workflows/auto-release.yml | 27 ++++++++++++++++++++++++--- CHANGELOG.md | 4 ++++ 2 files changed, 28 insertions(+), 3 deletions(-) diff --git a/.github/workflows/auto-release.yml b/.github/workflows/auto-release.yml index 2eb9b11..442b16c 100644 --- a/.github/workflows/auto-release.yml +++ b/.github/workflows/auto-release.yml @@ -31,6 +31,28 @@ jobs: else echo "PRE_RELEASE=false" >> $GITHUB_OUTPUT fi + update-versions: + needs: [define-variables] + name: Update Manifest Version + runs-on: ubuntu-latest + if: needs.define-variables.outputs.pre_release == 'false' + env: + NPM_PACKAGE_VERSION: ${{ needs.define-variables.outputs.version }} + steps: + - uses: actions/checkout@v4 + with: + persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token + fetch-depth: 0 # otherwise, you will failed to push refs to dest repo + # - uses: actions/setup-node@v4 + # with: + # node-version: 18 + - run: npm run version + - name: Commit & Push Version Increment + uses: actions-js/push@master + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + message: "[skip ci] updated mainfest version" + branch: ${{ github.ref_name }} create-release: needs: [define-variables] name: Create Github Release @@ -39,11 +61,10 @@ jobs: env: NPM_PACKAGE_VERSION: ${{ needs.define-variables.outputs.version }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Build Plugin run: | npm install - npm run version npm run build - uses: "marvinpinto/action-automatic-releases@latest" name: Publish Release @@ -63,7 +84,7 @@ jobs: env: NPM_PACKAGE_VERSION: ${{ needs.define-variables.outputs.version }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Build Plugin run: | npm install diff --git a/CHANGELOG.md b/CHANGELOG.md index 34bc9ff..2da422b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [Next] - 2024-11-21 + +- [⚙️] ci: Updated build workflow to use update version of `mainfest.json` file + ## [1.3.0] - 2024-08-06 ### Added