From 547c4c8a10a393f44bf605db92bbc78a25867d02 Mon Sep 17 00:00:00 2001 From: Murage <25152892+0xMurage@users.noreply.github.com> Date: Thu, 24 Oct 2024 06:20:32 +0300 Subject: [PATCH] ci: add github semantic release workflow --- .github/workflows/semantic-release.yaml | 41 +++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/semantic-release.yaml diff --git a/.github/workflows/semantic-release.yaml b/.github/workflows/semantic-release.yaml new file mode 100644 index 0000000..f51ae6f --- /dev/null +++ b/.github/workflows/semantic-release.yaml @@ -0,0 +1,41 @@ +on: + push: + branches: + - release + +jobs: + semantic_release: + runs-on: + - ubuntu-latest + + steps: + - name: Set up git + env: + GH_TOKEN: ${{ github.token }} + run: | + git config --global user.email "${GITHUB_ACTOR_ID}+${GITHUB_ACTOR}@users.noreply.github.com" + git config --global user.name "${GITHUB_ACTOR}" + + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + fetch-tags: false + + - name: Set up pnpm + uses: pnpm/action-setup@v4 + with: + run_install: false + + - name: Set up Node.js + uses: actions/setup-node@v4 + with: + node-version-file: 'package.json' + cache: 'pnpm' + + - name: Install dependencies # Install only the dependencies required for the release which are at root. + run: pnpm install --workspace-root --prod=false + + - name: Run automated version + run: pnpm run release + env: + RELEASE_SCM_BASE: ${{github.event.before}} # the base is commit before merge \ No newline at end of file