-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1ff13b2
commit 4494850
Showing
12 changed files
with
193 additions
and
578 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
name: Create Pre-Release PR | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
|
||
jobs: | ||
check-releasability: | ||
name: Check if is Releasable | ||
runs-on: ubuntu-latest | ||
outputs: | ||
is-releasable: ${{ steps.check.outputs.is-releasable }} | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Check if is Releasable | ||
id: check | ||
run: | | ||
last_commit=$(git log -1 --pretty=%B) | ||
if [[ $last_commit == "chore(release): released version"* ]]; then | ||
echo "is-releasable=false" >> $GITHUB_OUTPUT | ||
else | ||
echo "is-releasable=true" >> $GITHUB_OUTPUT | ||
fi | ||
create_pr: | ||
name: Create Pre-Release PR with Updated Changelogs and Versions | ||
needs: check-releasability | ||
if: needs.check-releasability.outputs.is-releasable == 'true' | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
ref: ${{ github.event.pull_request.head.ref }} | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20.14.0 | ||
|
||
- name: Restore root node_modules cache | ||
uses: actions/cache@v4 | ||
id: cache | ||
with: | ||
path: | | ||
node_modules | ||
apps/api/node_modules | ||
apps/deploy-web/node_modules | ||
packages/*/node_modules | ||
key: common-${{ runner.os }}-${{ hashFiles('package-lock.json') }} | ||
|
||
- name: Install dependencies | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
run: npm ci -w packages/releaser | ||
|
||
- name: Generate releases and build docker images | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "CI" | ||
npm run release -w apps/api -- --verbose --ci | ||
npm run release -w apps/deploy-web -- --verbose --ci | ||
- name: Cleanup Previous Release Branch | ||
run: | | ||
git branch -D release/bumps || true | ||
- name: Commit and Create PR | ||
uses: peter-evans/create-pull-request@v7 | ||
with: | ||
token: '${{ github.token }}' | ||
branch: release/bumps | ||
base: main | ||
title: "Release bumps" | ||
body: "This is an automated PR to update the changelogs and versions for the next release. Merging it will trigger builds and deploy workflows" |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: Draft Api Release | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- 'apps/api/package.json' | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
release: | ||
name: Create Release Draft | ||
uses: ./.github/workflows/release-app.yml | ||
secrets: inherit | ||
with: | ||
app: api |
Oops, something went wrong.