Skip to content

fix: do not crash when overflow branch cannot be found #36

fix: do not crash when overflow branch cannot be found

fix: do not crash when overflow branch cannot be found #36

Workflow file for this run

name: Create GitHub releases
on:
pull_request:
types:
- closed
- labeled
jobs:
create-releases:
if: github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'main'
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Checkout release branch
run: |
git config --global user.name "Stainless Bot"
git config --global user.email "stainless-bot@users.noreply.github.com"
git checkout release
- name: Merge main into release branch
run: |
git pull origin release --rebase=false --ff-only
git merge --no-ff main
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18
- run: corepack enable && corepack prepare
# Note: actions/setup-node doesn't yet provide parameters for corepack, we need to run it again after enabling it
- uses: actions/setup-node@v3
with:
node-version: 18
cache: pnpm
- name: Install dependencies
run: pnpm install
- name: Compile
run: pnpm build
- name: Commit and push build directory
run: |
git add -f ./build
git diff --cached --exit-code || git commit -m "Build sources"
git push origin release
- name: Create github release
run: |
pnpm start \
-- github-release \
--token=${{ secrets.GITHUB_TOKEN }} \
--repo-url=${{ github.repository }} \
--target-branch=release