From d06c228e84c1b7d0ee8b46fafff9f1ed205dae49 Mon Sep 17 00:00:00 2001 From: Nikita Barsukov Date: Wed, 20 Sep 2023 11:08:28 +0300 Subject: [PATCH 1/2] ci: update some legacy configs inside `create-release.yml` --- .github/workflows/create-release.yml | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index 3f84d11a8..26a4f4334 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -25,26 +25,23 @@ jobs: env: IS_DRY_MODE: ${{ github.event.inputs.dryRun == 'true' }} steps: - - name: Fetch from origin repo - uses: actions/checkout@v4.0.0 + - uses: actions/checkout@v4.0.0 with: fetch-depth: 0 + persist-credentials: false ref: ${{ github.head_ref }} token: ${{ secrets.TAIGA_FAMILY_BOT_PAT }} - - - name: Setup Node.js and Cache - uses: taiga-family/ci/actions/setup-node@1.13.0 + - uses: taiga-family/ci/actions/setup-node@1.13.0 + - uses: taiga-family/ci/actions/setup-git@1.13.0 + with: + token: ${{ secrets.TAIGA_FAMILY_BOT_PAT }} - name: Run release id: run-release run: | - git config --global user.name "tinkoff-bot" - git config --global user.email "tinkoff-bot@tinkoff.ru" - git config --global push.followTags true - - npm run release -- \ - --release-as ${{ github.event.inputs.mode }} \ - --dry-run ${{ github.event.inputs.dryRun }} + npm run release -- \ + --release-as ${{ github.event.inputs.mode }} \ + --dry-run ${{ github.event.inputs.dryRun }} echo "new_version=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT @@ -52,7 +49,7 @@ jobs: id: generate_body run: | npx extract-changelog-release > RELEASE_BODY.md - echo "tag_name=$(git describe HEAD --abbrev=0)" >> $GITHUB_OUTPUT + echo "tag_name=$(git describe --abbrev=0 --tags)" >> $GITHUB_OUTPUT - id: get-pr-body run: | @@ -94,7 +91,7 @@ jobs: - name: Create GitHub Release if: ${{ env.IS_DRY_MODE == 'false' }} - uses: ncipollo/release-action@v1 + uses: ncipollo/release-action@v1.13.0 with: name: Release ${{ steps.generate_body.outputs.tag_name }} tag: ${{ steps.generate_body.outputs.tag_name }} From 11622928c4577b94c6e0aa2696dc5faf3e5b8d2e Mon Sep 17 00:00:00 2001 From: Nikita Barsukov Date: Wed, 20 Sep 2023 11:15:11 +0300 Subject: [PATCH 2/2] chore: fix prettier issue --- .github/workflows/create-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml index 26a4f4334..dbce600ef 100644 --- a/.github/workflows/create-release.yml +++ b/.github/workflows/create-release.yml @@ -39,7 +39,7 @@ jobs: - name: Run release id: run-release run: | - npm run release -- \ + npm run release -- \ --release-as ${{ github.event.inputs.mode }} \ --dry-run ${{ github.event.inputs.dryRun }}