From 8155b111496cadec654b28552ae143bc88eac3c2 Mon Sep 17 00:00:00 2001 From: "ala'n (Alexey Stsefanovich)" Date: Thu, 22 Jun 2023 15:00:55 +0200 Subject: [PATCH] chore: `release-please` draft integration --- .github/workflows/release-pr.yml | 64 ++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 .github/workflows/release-pr.yml diff --git a/.github/workflows/release-pr.yml b/.github/workflows/release-pr.yml new file mode 100644 index 0000000000..65c6d1e205 --- /dev/null +++ b/.github/workflows/release-pr.yml @@ -0,0 +1,64 @@ +name: Release PR + +on: + push: + branches: [ main ] + +permissions: + contents: write + pull-requests: write + +env: + node-version: 18.x + +jobs: + release-pr: + name: Release Please + runs-on: ubuntu-latest + + steps: + - uses: google-github-actions/release-please-action@v3 + id: ReleasePR + with: + default-branch: main + package-name: '@exadel/esl' + versioning-strategy: default + release-type: node + command: release-pr + changelog-types: '[ + {"type":"feat","section":"Features","hidden":false}, + {"type":"fix", "section":"Bug Fixes","hidden":false}, + {"type":"refactor", "section":"Refactoring","hidden":false}, + ]' + pull-request-title-pattern: 'chore${scope}: release ${component} ${version}' + labels: 'release: counted' + release-labels: 'released' + + # The logic below handles the npm publication: + - if: ${{ steps.ReleasePR.outputs.release_created }} + uses: actions/checkout@v3 + with: + persist-credentials: false + + - if: ${{ steps.ReleasePR.outputs.release_created }} + name: Use Node v${{ env.node-version }} + uses: actions/setup-node@v3 + with: + cache: 'npm' + node-version: ${{ env.node-version }} + + - if: ${{ steps.ReleasePR.outputs.release_created }} + name: Install NPM Dependencies + run: npm ci + +# - if: ${{ steps.ReleasePR.outputs.release_created }} +# run: npm publish +# env: +# NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + +# - if: ${{ steps.ReleasePR.outputs.release_created }} +# name: Upload Release Artifact +# env: +# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} +# run: +# gh release upload ${{ steps.release.outputs.tag_name }} ./artifact/some-build-artifact.zip