From 507889eb01639e6228f92d7e429e40b821068f71 Mon Sep 17 00:00:00 2001 From: just-pthai-it Date: Sun, 25 Aug 2024 17:09:48 +0700 Subject: [PATCH] ci(github-action): add automatic create tag workflow. --- .github/workflows/release.yml | 37 +++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..6113038 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,37 @@ +name: Release new version + +on: + workflow_dispatch: + inputs: + actor_email: + description: "Email of the person triggering the workflow" + required: false + default: "pthai.it.210501@gmail.com" + + +jobs: + release: + name: Release + runs-on: ubuntu-22.04 + + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: "20" + + - name: Config git + run: | + git config --global user.email "${{ github.event.inputs.actor_email }}" + git config --global user.name "${{ github.actor }}" + + - name: Release new version + run: npx --yes commit-and-tag-version -a + + - name: Push new version + run: | + git push --follow-tags origin main