Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: update some legacy configs inside create-release.yml #523

Merged
merged 2 commits into from
Sep 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 10 additions & 13 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,34 +25,31 @@ jobs:
env:
IS_DRY_MODE: ${{ github.event.inputs.dryRun == 'true' }}
steps:
- name: Fetch from origin repo
uses: actions/[email protected]
- uses: actions/[email protected]
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/[email protected]
- uses: taiga-family/ci/actions/[email protected]
- uses: taiga-family/ci/actions/[email protected]
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 "[email protected]"
git config --global push.followTags true

npm run release -- \
--release-as ${{ github.event.inputs.mode }} \
--dry-run ${{ github.event.inputs.dryRun }}
--release-as ${{ github.event.inputs.mode }} \
--dry-run ${{ github.event.inputs.dryRun }}

echo "new_version=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT

- name: Generate Release Body
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: |
Expand Down Expand Up @@ -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 }}
Expand Down