Skip to content

Alpha release

Alpha release #241

Workflow file for this run

name: Release
on:
pull_request:
types: [closed]
branches:
- release
- alpha
jobs:
test:
runs-on: ubuntu-latest
permissions: write-all
strategy:
matrix:
node-version: [20.x, 22.4.x]
steps:
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Setup Helm
uses: azure/setup-helm@v4.1.0
- name: Checkout
uses: actions/checkout@v4
- name: Run environment
run: docker compose up -d --quiet-pull
- name: Install dependencies
run: npm ci
env:
HUSKY: 0
- name: Run tests
run: npx jest --testTimeout=30000
publish:
if: github.event.pull_request.merged == true
needs: test
runs-on: ubuntu-latest
steps:
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 18
registry-url: 'https://registry.npmjs.org'
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Import GPG key
id: gpg
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.TOABOT_GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.TOABOT_GPG_PASSPHRASE }}
git_user_signingkey: true
git_commit_gpgsign: true
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.TOABOT_GITHUB_TOKEN }}
GIT_AUTHOR_NAME: ${{ steps.gpg.outputs.name }}
GIT_AUTHOR_EMAIL: ${{ steps.gpg.outputs.email }}
GIT_COMMITTER_NAME: ${{ steps.gpg.outputs.name }}
GIT_COMMITTER_EMAIL: ${{ steps.gpg.outputs.email }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
npm ci
if [ ${{ github.base_ref }} = release ]; then
npx lerna publish --conventional-graduate --no-commit-hooks --no-changelog --yes --message "ci: %s" --sign-git-commit
else
npx lerna publish --conventional-prerelease --preid alpha --dist-tag alpha --no-commit-hooks --no-changelog --yes --message "ci: %s" --sign-git-commit
fi
git fetch
git checkout dev
git merge ${{ github.base_ref }}
git push --all origin --no-verify