Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/pr-submit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
workflows:
- .github/workflows/prepare-release.yml
18 changes: 10 additions & 8 deletions .github/workflows/prepare-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,12 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 5
permissions:
contents: write
issues: write
pull-requests: write
contents: read
id-token: write
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
token: ${{ secrets.FASTAPI_VSCODE_LATEST_CHANGES }} # zizmor: ignore[secrets-outside-env]
persist-credentials: true
persist-credentials: false
- name: Prepare release
env:
BUMP: ${{ inputs.bump }}
Expand All @@ -42,18 +40,22 @@ jobs:
set -euo pipefail
version="$(node scripts/prepare-release.mjs current-version)"
echo "version=$version" >> "$GITHUB_OUTPUT"
- name: Get PR Submit token
id: pr-submit
uses: tiangolo/pr-submit@d802fdf59bde80bc3eb8bd3259f4cbeec63de4aa # 0.0.1
- name: Create release pull request
env:
GH_TOKEN: ${{ secrets.FASTAPI_VSCODE_LATEST_CHANGES }}
GH_TOKEN: ${{ steps.pr-submit.outputs.token }}
VERSION: ${{ steps.release-version.outputs.version }}
run: |
set -euo pipefail
branch="release-${VERSION}-${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}"
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git config user.name "pr-submit[bot]"
git config user.email "pr-submit[bot]@users.noreply.github.com"
git switch -c "$branch"
git add package.json CHANGELOG.md
git commit -m "🔖 Release version ${VERSION}"
gh auth setup-git
git push --set-upstream origin "$branch"
gh pr create \
--base main \
Expand Down
Loading