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
66 changes: 35 additions & 31 deletions .github/workflows/deploy_prod.yml
Original file line number Diff line number Diff line change
@@ -1,51 +1,59 @@
name: AIO App CI
name: Production

on:
release:
types: [released]
push:
branches: [main]

permissions:
id-token: write
contents: write
issues: read
pull-requests: write

jobs:
deploy:
name: Deploy to Prod
runs-on: ${{ matrix.os }}
strategy:
max-parallel: 1
matrix:
node-version: ['22']
os: [ubuntu-latest]
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js 24.x
uses: actions/setup-node@v4
with:
node-version: '24'
- run: npm install
- run: npm test

release:
name: Release
runs-on: ubuntu-latest
needs: test
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
- uses: actions/checkout@v4
- name: Use Node.js 24.x
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: npm install
run: npm i
node-version: '24'
- run: npm install
- name: Setup CLI
uses: adobe/aio-cli-setup-action@1.3.0
with:
os: ${{ matrix.os }}
os: ubuntu-latest
version: 11.x.x
- name: Auth
uses: adobe/aio-apps-action@3.3.0
with:
os: ${{ matrix.os }}
os: ubuntu-latest
command: oauth_sts
CLIENTID: ${{ secrets.CLIENTID_PROD }}
CLIENTSECRET: ${{ secrets.CLIENTSECRET_PROD }}
TECHNICALACCOUNTID: ${{ secrets.TECHNICALACCID_PROD }}
TECHNICALACCOUNTEMAIL: ${{ secrets.TECHNICALACCEMAIL_PROD }}
IMSORGID: ${{ secrets.IMSORGID_PROD }}
SCOPES: ${{ secrets.SCOPES_PROD }}
- name: Build
env:
AIO_RUNTIME_NAMESPACE: ${{ secrets.AIO_RUNTIME_NAMESPACE_PROD }}
uses: adobe/aio-apps-action@3.3.0
with:
os: ${{ matrix.os }}
command: build
- name: Deploy
- name: Semantic Release
run: npm run semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
AIO_RUNTIME_NAMESPACE: ${{ secrets.AIO_RUNTIME_NAMESPACE_PROD }}
AIO_RUNTIME_AUTH: ${{ secrets.AIO_RUNTIME_AUTH_PROD }}
AIO_PROJECT_ID: ${{ secrets.AIO_PROJECT_ID_PROD }}
Expand All @@ -60,7 +68,3 @@ jobs:
AIO_IMSORGID: ${{ secrets.IMSORGID_PROD }}
AIO_EVENTS_PROVIDER_ID: ${{ secrets.EVENTS_PROVIDER_ID_PROD }}
EMAIL_TOKEN: ${{ secrets.EMAIL_TOKEN_PROD }}
uses: adobe/aio-apps-action@3.3.0
with:
os: ${{ matrix.os }}
command: deploy
63 changes: 43 additions & 20 deletions .github/workflows/deploy_stage.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,43 @@
name: AIO App CI
name: Stage

on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened]
branches: [main]

jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js 24.x
uses: actions/setup-node@v4
with:
node-version: '24'
- run: npm install
- run: npm test

deploy:
name: Deploy to Stage
runs-on: ${{ matrix.os }}
strategy:
max-parallel: 1
matrix:
node-version: ['22']
os: [ubuntu-latest]
runs-on: ubuntu-latest
needs: test
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
- uses: actions/checkout@v4
- name: Use Node.js 24.x
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: npm install
run: npm i
node-version: '24'
- run: npm install
- name: Setup CLI
uses: adobe/aio-cli-setup-action@1.3.0
with:
os: ${{ matrix.os }}
os: ubuntu-latest
version: 11.x.x
- name: Auth
uses: adobe/aio-apps-action@3.3.0
with:
os: ${{ matrix.os }}
os: ubuntu-latest
command: oauth_sts
CLIENTID: ${{ secrets.CLIENTID_STAGE }}
CLIENTSECRET: ${{ secrets.CLIENTSECRET_STAGE }}
Expand All @@ -43,7 +50,7 @@ jobs:
AIO_RUNTIME_NAMESPACE: ${{ secrets.AIO_RUNTIME_NAMESPACE_STAGE }}
uses: adobe/aio-apps-action@3.3.0
with:
os: ${{ matrix.os }}
os: ubuntu-latest
command: build
- name: Deploy
env:
Expand All @@ -63,6 +70,22 @@ jobs:
EMAIL_TOKEN: ${{ secrets.EMAIL_TOKEN_STAGE }}
uses: adobe/aio-apps-action@3.3.0
with:
os: ${{ matrix.os }}
os: ubuntu-latest
command: deploy
noPublish: true

post-deploy-test:
name: Post-Deploy Tests
runs-on: ubuntu-latest
needs: deploy
steps:
- uses: actions/checkout@v4
- name: Use Node.js 24.x
uses: actions/setup-node@v4
with:
node-version: '24'
- run: npm install
- name: Post-Deploy Tests
run: npm run test-postdeploy
env:
AIO_RUNTIME_NAMESPACE: ${{ secrets.AIO_RUNTIME_NAMESPACE_STAGE }}
45 changes: 0 additions & 45 deletions .github/workflows/pr_test.yml

This file was deleted.

21 changes: 21 additions & 0 deletions .releaserc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
module.exports = {
plugins: [
'@semantic-release/commit-analyzer',
'@semantic-release/release-notes-generator',
['@semantic-release/changelog', {
changelogFile: 'CHANGELOG.md',
}],
['@semantic-release/npm', {
npmPublish: false,
}],
['@semantic-release/exec', {
publishCmd: 'aio app deploy',
}],
['@semantic-release/git', {
assets: ['package.json', 'package-lock.json', 'CHANGELOG.md'],
message: 'chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}',
}],
'@semantic-release/github',
],
branches: ['main'],
};
7 changes: 7 additions & 0 deletions app.config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,11 @@ application:
concurrency: 1
annotations:
final: true
version:
function: dist/actions/version/index.js
runtime: nodejs:22
web: 'yes'
annotations:
require-adobe-auth: false
final: true

23 changes: 0 additions & 23 deletions e2e/generic.e2e.test.js

This file was deleted.

23 changes: 0 additions & 23 deletions e2e/publish-events.e2e.test.js

This file was deleted.

1 change: 1 addition & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ export default {
transform: {},
testEnvironment: 'node',
testTimeout: 10000,
testPathIgnorePatterns: ['/node_modules/', 'post-deploy'],
};
Loading
Loading