-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(release): implement release with image build
- Loading branch information
1 parent
34dbbf1
commit 98f74c9
Showing
50 changed files
with
3,862 additions
and
161 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 |
---|---|---|
|
@@ -15,7 +15,8 @@ | |
"deployment", | ||
"certificate", | ||
"dx", | ||
"stats" | ||
"stats", | ||
"release" | ||
] | ||
] | ||
} | ||
|
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
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
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
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,54 @@ | ||
name: Release All Apps | ||
|
||
on: | ||
push: | ||
branches: ["main"] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
packages: write | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20.14.0 | ||
|
||
- name: Restore root node_modules cache | ||
uses: martijnhols/actions-cache@v3 | ||
id: cache | ||
with: | ||
path: node_modules | ||
key: ${{ runner.os }}-${{ hashFiles('package-lock.json') }} | ||
|
||
- name: Install dependencies | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
run: npm ci | ||
|
||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Build the Docker images | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "Akash Network Team" | ||
npm run release -w apps/api -- --preRelease=beta --verbose --ci -r ${{ secrets.API_REGISTRY }} | ||
npm run release -w apps/deploy-web -- --preRelease=beta -f --verbose --ci -r ${{ secrets.WEB_REGISTRY }} |
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,82 @@ | ||
name: Release App | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
app: | ||
type: choice | ||
description: Which app to release | ||
options: | ||
- api | ||
- deploy-web | ||
required: true | ||
release-type: | ||
type: choice | ||
description: Which app to release | ||
options: | ||
- prod | ||
- beta | ||
default: prod | ||
force-build: | ||
type: boolean | ||
description: Rebuild the Docker image | ||
default: false | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
packages: write | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20.14.0 | ||
|
||
- name: Restore root node_modules cache | ||
uses: martijnhols/actions-cache@v3 | ||
id: cache | ||
with: | ||
path: node_modules | ||
key: ${{ runner.os }}-${{ hashFiles('package-lock.json') }} | ||
|
||
- name: Install dependencies | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
run: npm ci | ||
|
||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Build the Docker images | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "Akash Network Team" | ||
pre_release="" | ||
if [[ "${{ github.event.inputs.release-type }}" == 'beta' ]]; then | ||
prerelease="--preRelease=beta" | ||
fi | ||
force_build="" | ||
if [[ "${{ github.event.inputs.force-build }}" == 'true' ]]; then | ||
force_build="-f" | ||
fi | ||
npm run release -w apps/${{ github.event.inputs.app }} -- $pre_release $force_build --verbose --ci -r ${{ secrets.API_REGISTRY }} |
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
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,8 @@ | ||
if [[ "$CI" != "true" ]]; then | ||
turbo update-apps-local-deps \ | ||
--filter=./packages/database \ | ||
--filter=./packages/env-loader \ | ||
--filter=./packages/http-sdk \ | ||
--filter=./packages/ui | ||
git add ./apps/*/mvm.lock | ||
fi |
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
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 @@ | ||
module.exports = require("@akashnetwork/releaser") |
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,10 @@ | ||
{ | ||
"dependencies": { | ||
"@akashnetwork/database": "1.0.0", | ||
"@akashnetwork/env-loader": "1.0.1", | ||
"@akashnetwork/http-sdk": "1.0.7" | ||
}, | ||
"devDependencies": { | ||
"@akashnetwork/dev-config": "1.0.0" | ||
} | ||
} |
Empty file.
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
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 @@ | ||
module.exports = require("@akashnetwork/releaser") |
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,10 @@ | ||
{ | ||
"dependencies": { | ||
"@akashnetwork/env-loader": "1.0.1", | ||
"@akashnetwork/http-sdk": "1.0.7", | ||
"@akashnetwork/ui": "1.0.0" | ||
}, | ||
"devDependencies": { | ||
"@akashnetwork/dev-config": "1.0.0" | ||
} | ||
} |
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
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,9 @@ | ||
{ | ||
"dependencies": { | ||
"@akashnetwork/database": "1.0.0", | ||
"@akashnetwork/env-loader": "1.0.1" | ||
}, | ||
"devDependencies": { | ||
"@akashnetwork/dev-config": "1.0.0" | ||
} | ||
} |
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,8 @@ | ||
{ | ||
"dependencies": { | ||
"@akashnetwork/ui": "1.0.0" | ||
}, | ||
"devDependencies": { | ||
"@akashnetwork/dev-config": "1.0.0" | ||
} | ||
} |
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,5 @@ | ||
{ | ||
"devDependencies": { | ||
"@akashnetwork/dev-config": "1.0.0" | ||
} | ||
} |
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,8 @@ | ||
{ | ||
"dependencies": { | ||
"@akashnetwork/ui": "1.0.0" | ||
}, | ||
"devDependencies": { | ||
"@akashnetwork/dev-config": "1.0.0" | ||
} | ||
} |
Oops, something went wrong.