fix: lerna #631
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Release" | |
on: | |
push: | |
branches: | |
- master | |
- beta | |
- alpha | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
# - name: Wait for other checks to succeed | |
# uses: lewagon/[email protected] | |
# with: | |
# ref: ${{ github.ref }} | |
# running-workflow-name: "release" | |
# repo-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
token: ${{ secrets.SOCIALGROOVYBOT_BOTO_PAT }} | |
fetch-depth: "0" # Pull all commits, required for lerna version | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
cache: 'yarn' | |
- name: Install dependencies | |
run: yarn --immutable | |
- name: Import GPG key | |
uses: crazy-max/ghaction-import-gpg@v5 | |
with: | |
gpg_private_key: ${{ secrets.SOCIALGROOVYBOT_GPG_PRIVATE_KEY }} | |
passphrase: ${{ secrets.SOCIALGROOVYBOT_GPG_PASSPHRASE }} | |
git_user_signingkey: true | |
git_commit_gpgsign: true | |
git_push_gpgsign: false | |
git_tag_gpgsign: true | |
- name: Run release | |
env: | |
GIT_AUTHOR_EMAIL: ${{ secrets.SOCIALGROOVYBOT_EMAIL }} | |
GIT_AUTHOR_NAME: ${{ secrets.SOCIALGROOVYBOT_NAME }} | |
GIT_COMMITTER_EMAIL: ${{ secrets.SOCIALGROOVYBOT_EMAIL }} | |
GIT_COMMITTER_NAME: ${{ secrets.SOCIALGROOVYBOT_NAME }} | |
GH_TOKEN: ${{ secrets.SOCIALGROOVYBOT_BOTO_PAT }} | |
shell: bash | |
run: | | |
if [[ "$GITHUB_REF" == *"alpha"* ]]; then | |
yarn lerna version --conventional-commits --conventional-prerelease --preid alpha --yes | |
elif [[ "$GITHUB_REF" == *"beta"* ]]; then | |
yarn lerna version --conventional-commits --conventional-prerelease --preid beta --yes | |
else | |
yarn lerna version --conventional-commits --conventional-graduate --yes | |
fi | |
yarn lerna publish from-git --yes | |
# - name: Push release | |
# shell: bash | |
# env: | |
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# run: | | |
# git remote set-url --push origin https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git | |
# git push -f --follow-tags origin master |