ci: Created deploy key for releases to push directly to main branch [skip ci]
This commit is contained in:
@@ -28,13 +28,9 @@ jobs:
|
|||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
|
ssh-key: ${{ secrets.RELEASE_BOT_SSH_KEY }}
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Configure Git user
|
|
||||||
run: |
|
|
||||||
git config user.name "github-actions[bot]"
|
|
||||||
git config user.email "github-actions[bot]@users.noreply.github.com"
|
|
||||||
|
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
@@ -49,36 +45,17 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
cz bump --yes --increment ${{ github.event.inputs.bump_type }}
|
cz bump --yes --increment ${{ github.event.inputs.bump_type }}
|
||||||
|
|
||||||
- name: Stage and Commit Changes
|
- name: Push changes
|
||||||
run: |
|
|
||||||
git add .
|
|
||||||
git commit -m "chore: bump version using Commitizen"
|
|
||||||
|
|
||||||
- name: Push changes to a new branch
|
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
VERSION=$(cz version)
|
git push origin main --follow-tags
|
||||||
BRANCH_NAME="release-$VERSION"
|
|
||||||
git checkout -b $BRANCH_NAME
|
|
||||||
git add .
|
|
||||||
git commit -m "chore: bump version to $VERSION"
|
|
||||||
git push origin $BRANCH_NAME
|
|
||||||
|
|
||||||
- name: Create pull request
|
|
||||||
uses: peter-evans/create-pull-request@v5
|
|
||||||
with:
|
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
branch: ${{ steps.push-changes.outputs.BRANCH_NAME }}
|
|
||||||
title: "Release ${{ steps.push-changes.outputs.VERSION }}"
|
|
||||||
body: "This pull request contains the changes for the ${{ steps.push-changes.outputs.VERSION }} release."
|
|
||||||
base: main
|
|
||||||
|
|
||||||
release-plz:
|
release-plz:
|
||||||
# see https://release-plz.ieni.dev/docs/github
|
# see https://release-plz.ieni.dev/docs/github
|
||||||
# for more information
|
# for more information
|
||||||
needs: bump
|
needs: bump
|
||||||
name: Release Crate
|
name: Release-plz
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Check if actor is repository owner
|
- name: Check if actor is repository owner
|
||||||
|
|||||||
Reference in New Issue
Block a user