Release #30
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: workflow_dispatch | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 17 | |
registry-url: https://registry.npmjs.org/ | |
- run: npm run bootstrap | |
- run: npm run build | |
- run: node scripts/bump-version.js | |
- run: | | |
VERSION=$(node -p "require('./lerna.json').version") | |
BRANCH="bump-version-$VERSION" | |
gh auth setup-git | |
git config --global user.name 'Release' | |
git config --global user.email '[email protected]' | |
git checkout -b $BRANCH | |
git commit -am "chore: Bump version ($VERSION)" | |
git push --set-upstream origin $BRANCH | |
PR_URL="$(gh pr create --title "chore: Bump version ($VERSION)" --body 'This is automatic PR to bump version')" | |
gh pr merge --auto --squash "$PR_URL" | |
HEAD_SHA=$(gh api repos/${GITHUB_REPOSITORY}/commits/$BRANCH --jq '.sha') | |
gh api repos/${GITHUB_REPOSITORY}/check-runs \ | |
-F name="test" \ | |
-F head_sha="$HEAD_SHA" \ | |
-F status="completed" \ | |
-F conclusion="success" \ | |
-F output.title="All checks passed" \ | |
-F output.summary="This is a simulated successful check." | |
gh release create "$VERSION" \ | |
--repo="$GITHUB_REPOSITORY" \ | |
--title="${VERSION#v}" \ | |
--generate-notes \ | |
./lib/*.zip | |
env: | |
GH_TOKEN: ${{ github.token }} |