Scheduling infrastructure for absolutely everyone.
ci: Add new release actions (#17789)
Omar López9c10ecf8ea54
diff --git a/.github/workflows/draft-release.yml b/.github/workflows/draft-release.ymlnew file mode 100644index 00000000000..2435481cf8f--- /dev/null+++ b/.github/workflows/draft-release.yml@@ -0,0 +1,50 @@+name: Draft release+run-name: Draft release ${{ inputs.next_version }}++on:+ workflow_dispatch:+ inputs:+ next_version:+ required: true+ type: string+ description: 'Version name'++permissions:+ contents: write++jobs:+ draft_release:+ runs-on: ubuntu-latest++ steps:++ - name: Checkout code+ uses: actions/checkout@v4+ with:+ fetch-depth: 0+ ref: 'main'+ ssh-key: ${{ secrets.DEPLOY_KEY }}++ - name: Configure git+ run: |+ git config --local user.email "[email protected]"+ git config --local user.name "GitHub Actions"++ - uses: threeal/[email protected]++ - name: Bump version+ run: |+ cd apps/web+ yarn version ${{ inputs.next_version }}++ - name: Commit changes+ run: |+ git add .+ git commit -m "chore: release v${{ inputs.next_version }}"+ git push++ - name: Draft release+ run: gh release create v$VERSION --generate-notes --draft+ env:+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}+ VERSION: ${{ inputs.next_version }}diff --git a/.github/workflows/post-release.yml b/.github/workflows/post-release.ymlnew file mode 100644index 00000000000..9ee18361ec2--- /dev/null+++ b/.github/workflows/post-release.yml@@ -0,0 +1,25 @@+name: Post release+on:+ workflow_dispatch:+ push:+ # Pattern matched against refs/tags+ tags:+ - "*"++jobs:+ release:+ runs-on: ubuntu-latest+ steps:+ - name: Checkout code+ uses: actions/checkout@v4+ with:+ fetch-depth: 0+ ref: 'main'+ ssh-key: ${{ secrets.DEPLOY_KEY }}++ - name: Configure git+ run: |+ git config --local user.email "[email protected]"+ git config --local user.name "GitHub Actions"++ - run: git push origin +main:productiondiff --git a/.github/workflows/release.yml b/.github/workflows/release.ymldeleted file mode 100644index 600404b92c8..00000000000--- a/.github/workflows/release.yml+++ /dev/null@@ -1,17 +0,0 @@-on:- workflow_dispatch:- push:- # Pattern matched against refs/tags- tags:- - "*" # Push events to every tag not containing /--jobs:- release:- runs-on: ubuntu-latest- steps:- - uses: actions/checkout@v4- with:- ref: main # Always checkout main even for tagged releases- fetch-depth: 0- token: ${{ secrets.GH_ACCESS_TOKEN }}- - run: git push origin +main:production