Skip to content
Draft
Show file tree
Hide file tree
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
77 changes: 77 additions & 0 deletions .github/workflows/init-icon-prerelease.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: init-icon-prerelease
on:
workflow_dispatch:
branch:
- master
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
jobs:
check-exist-pr:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/[email protected]
- name: check-not-merged-pr
run: |
prs=$(gh pr list \
--base 'master' \
--json title \
-A semrush-ci-whale \
-S 'Merge release tag into master' \
--jq 'length')
if ((prs > 0)); then
echo "Merge exist PR with last release to the master first"
exit 1
fi
init-prerelease:
runs-on: ubuntu-latest
needs:
- check-exist-pr
steps:
- uses: actions/[email protected]
with:
token: ${{ secrets.BOT_ACCOUNT_GITHUB_TOKEN }}
fetch-depth: 0
persist-credentials: false
- uses: pnpm/[email protected]
name: Install pnpm
id: pnpm-install
with:
version: 10.11.1
run_install: false
- uses: actions/[email protected]
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v4
name: Restore pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
- name: Install restored dependencies
run: |
pnpm install
- name: Github GPG Auth
uses: crazy-max/ghaction-import-gpg@72b6676b71ab476b77e676928516f6982eef7a41
with:
gpg_private_key: ${{ secrets.BOT_ACCOUNT_GPG_PRIVATE_KEY }}
git_user_signingkey: true
git_commit_gpgsign: true
git_committer_name: semrush-ci-whale
git_committer_email: [email protected]
- name: NPM setup
run: |
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" >> ".npmrc"
echo "strict-peer-dependencies=false" >> ".npmrc"
- name: NPM auth check
run: pnpm whoami
- name: Init prerelease
env:
GITHUB_SECRET: ${{ secrets.BOT_ACCOUNT_GITHUB_TOKEN }}
run: |
git config user.name "semrush-ci-whale"
git config user.email "[email protected]"
git remote set-url origin "https://${GITHUB_SECRET}@github.com/semrush/intergalactic.git"
pnpm init-icon-prerelease
Loading