-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Anton Baliasnikov <anton.baliasnikov@iohk.io> Signed-off-by: Shailesh <Patil>
- Loading branch information
1 parent
1310f81
commit 1256f43
Showing
8 changed files
with
177 additions
and
0 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
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,65 @@ | ||
name: Release | ||
|
||
concurrency: | ||
group: release | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
release-branch: | ||
required: false | ||
type: string | ||
default: "main" | ||
workflow_dispatch: | ||
inputs: | ||
release-branch: | ||
description: "Branch to release from" | ||
required: false | ||
default: "main" | ||
|
||
jobs: | ||
release: | ||
env: | ||
GITHUB_ACTOR: ${{ secrets.ATALA_GITHUB_ACTOR }} | ||
GITHUB_TOKEN: ${{ secrets.ATALA_GITHUB_TOKEN }} | ||
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
token: ${{ secrets.ATALA_GITHUB_TOKEN }} | ||
ref: ${{ github.event.inputs.release-branch }} | ||
fetch-depth: 0 | ||
- name: Setup Java and Scala | ||
uses: olafurpg/setup-scala@v13 | ||
with: | ||
java-version: openjdk@1.11 | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: "lts/*" | ||
- uses: crazy-max/ghaction-import-gpg@v3 | ||
id: import_gpg | ||
with: | ||
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} | ||
git-user-signingkey: true | ||
git-commit-gpgsign: true | ||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ secrets.ATALA_GITHUB_ACTOR }} | ||
password: ${{ secrets.ATALA_GITHUB_TOKEN }} | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
- name: Release | ||
env: | ||
GIT_AUTHOR_EMAIL: ${{ steps.import_gpg.outputs.email }} | ||
GIT_COMMITTER_EMAIL: ${{ steps.import_gpg.outputs.email }} | ||
GIT_AUTHOR_NAME: ${{ steps.import_gpg.outputs.name }} | ||
GIT_COMMITTER_NAME: ${{ steps.import_gpg.outputs.name }} | ||
run: | | ||
npm install | ||
npx semantic-release |
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 |
---|---|---|
@@ -1,6 +1,7 @@ | ||
.bloop/ | ||
.metals/ | ||
.bsp/ | ||
.idea/ | ||
.vscode/ | ||
project/metals.sbt | ||
project/project/ | ||
|
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,84 @@ | ||
{ | ||
"name": "atala-prism-mediator", | ||
"version": "0.1.0", | ||
"engines": { | ||
"node": ">=16.13.0" | ||
}, | ||
"devDependencies": { | ||
"@commitlint/cli": "^17.0.3", | ||
"@commitlint/config-conventional": "^17.0.3", | ||
"@semantic-release/changelog": "^6.0.1", | ||
"@semantic-release/exec": "^6.0.3", | ||
"@semantic-release/git": "^10.0.1", | ||
"conventional-changelog-conventionalcommits": "^5.0.0", | ||
"gradle-semantic-release-plugin": "1.7.3", | ||
"husky": "^8.0.1", | ||
"pinst": "^3.0.0", | ||
"prettier": "^2.7.1", | ||
"semantic-release": "^19.0.3", | ||
"semantic-release-slack-bot": "^3.5.3" | ||
}, | ||
"release": { | ||
"branches": [ | ||
{ | ||
"name": "main" | ||
}, | ||
{ | ||
"name": "prerelease/*", | ||
"prerelease": "snapshot" | ||
} | ||
], | ||
"tagFormat": "prism-mediator-v${version}", | ||
"plugins": [ | ||
"@semantic-release/commit-analyzer", | ||
"@semantic-release/release-notes-generator", | ||
[ | ||
"@semantic-release/exec", | ||
{ | ||
"prepareCmd": "npm version ${nextRelease.version} --git-tag-version false" | ||
} | ||
], | ||
[ | ||
"@semantic-release/exec", | ||
{ | ||
"prepareCmd": "sbt \"release release-version ${nextRelease.version} next-version ${nextRelease.version}-SNAPSHOT with-defaults\"" | ||
} | ||
], | ||
[ | ||
"@semantic-release/exec", | ||
{ | ||
"prepareCmd": "docker buildx build --platform=linux/arm64,linux/amd64 --push -t ghcr.io/input-output-hk/atala-prism-mediator:${nextRelease.version} ./did-mediator/target/docker/stage" | ||
} | ||
], | ||
[ | ||
"@semantic-release/changelog", | ||
{ | ||
"changelogFile": "CHANGELOG.md" | ||
} | ||
], | ||
[ | ||
"@semantic-release/git", | ||
{ | ||
"assets": [ | ||
"version.sbt", | ||
"CHANGELOG.md", | ||
"package.json", | ||
"package-lock.json" | ||
], | ||
"message": "chore(release): cut prism mediator ${nextRelease.version} release\n\n${nextRelease.notes}" | ||
} | ||
], | ||
[ | ||
"semantic-release-slack-bot", | ||
{ | ||
"notifyOnSuccess": true, | ||
"notifyOnFail": true, | ||
"markdownReleaseNotes": true, | ||
"onSuccessTemplate": { | ||
"text": "A new version of Atala PRISM Mediator successfully released!\nVersion: `$npm_package_version`\nTag: $repo_url/releases/tag/$npm_package_version\n\nRelease notes:\n$release_notes" | ||
} | ||
} | ||
] | ||
] | ||
} | ||
} |
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 @@ | ||
ThisBuild / version := "0.1.0-SNAPSHOT" |